5

The diskutil said that my SD card is located on /dev/disk4, so I typed

sudo dd if=/dev/rdisk4 of=~/Desktop/backup.img bs=1m

to backup my SD card. But there is a message

dd: ~/Desktop/backup.img: No such file or directory

What's the problem?

2
  • Does the ~/Desktop/ directory exist? – Steve Robillard Jun 17 '17 at 15:50
  • @SteveRobillard It exists. The command works as I change to the target directory and replace it with sudo dd if=/dev/rdisk4 of=backup.img bs=1m – jcwu Jun 21 '17 at 7:15
9

If you are using sudo i.e. running with root permission you DO NOT have ~ as shortcut for your home directory.

Use FULL PATHS or cd to the target directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.