Teilprozess.check_output(): OSError Datei nicht gefunden in Python

Ausführen folgenden Befehl und seinen Varianten immer zu einem Fehler führt, der ich einfach nicht herausfinden:

command = "/bin/dd if=/dev/sda8 count=100 skip=$(expr 19868431049 /512)"

print subprocess.check_output([command])

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Welche Datei es sich bezieht ? andere Befehle wie ls,wc ordnungsgemäß ausgeführt werden, obwohl der Befehl auch ausgeführt wird, sowie auf terminal aber nicht python-Skript.

InformationsquelleAutor stackit | 2015-04-27
Schreibe einen Kommentar