dd

Tilde (~) isn't working in subprocess.Popen()

Tilde (~) isn't working in subprocess.Popen() Question: When I run in my Ubuntu terminal: sudo dd if=/dev/sda of=~/file bs=8k count=200k; rm -f ~/file it works fine. If I run it through Pythons subprocess.Popen(): output, err = subprocess.Popen([‘sudo’, ‘dd’, ‘if=/dev/’ + disk, ‘of=~/disk_benchmark_file’, ‘bs=8k’, ‘count=200k’], stderr=subprocess.PIPE).communicate() print err it doesn’t work. The Error I get is: …

Total answers: 4