How make rsync deal with spaces in a directory name?
Thanks to help from linuxquestions, I can back up this laptop to another laptop using rsync. Works great and extremely quickly!
You probably know that old TV series 24. America is just full of bad guys, and they all want to get Jack Bauer! It's rubbish I know, but it relaxes me in the evening. Yesterday, I wanted to copy a directory 24 Season6 from a usb to my old laptop. Thought I would use rsync, as I am very impressed with that program! But I kept getting errors. I think it is because of the space in the directory name. The usb is at /media/pedro/X3 I tried: Quote:
Is it the space causing the error? |
you need to mark the space so bash knows it is there. In Linux, most Unix, that is done with the backslash \
So "24 Season6" on the command line is "24\ Season6" Code:
rsync /media/pedro/X3/24\ Season6 /home/pedro/24 |
In addition to backslashes, you can also wrap the whole name in quotes. (Useful if a path would have lots of spaces.)
Also, for local paths you can use tab-completion - try typing... Code:
/me<tab>/p<tab>/X3/24<tab>6 |
Quote:
|
All times are GMT -5. The time now is 12:32 PM. |