Entering path containing spaces in Terminal
Working on my MacBook Pro, I want to change the location of my iPhone backup to an external drive, but when entering the command on the CLI I hadn't noticed that the destination drive has a space in the name (HARDDRV BKUP). How would I enter the following
ln -s /Volumes/HARDDRV BKUP/iphonebkup/Backup/ ~/Library/Application\ Support/MobileSync
using "HARDDRV BKUP" as the name of the external drive in Terminal? If I recall correctly, the CLI doesn't interpret SPACES the same way, and capitalization is important to take into account as well, correct? Can someone here correct this for me?
I am new at using the CLI and most of my experience is using the GUI, so I am getting very frustrated and don't have the energy to research all my notes on this.
Choose one of the following:
-
Surround the part of the path containing spaces in quotes:
ln -s /Volumes/"HARDDRV BKUP"/iphonebkup/Backup/ ~/Library/Application\ Support/MobileSync ^ ^
-
Surround the entire path in quotes:
ln -s "/Volumes/HARDDRV BKUP/iphonebkup/Backup/" ~/Library/Application\ Support/MobileSync ^ ^
-
Escape the space with a backslash
\
:ln -s /Volumes/HARDDRV\ BKUP/iphonebkup/Backup/ ~/Library/Application\ Support/MobileSync ^
Case sensitivity is important in these cases.