LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Directory name STORE1 vs store1. (https://www.linuxquestions.org/questions/linux-newbie-8/directory-name-store1-vs-store1-846800/)

stf92 11-26-2010 09:06 PM

Directory name STORE1 vs store1.
 
Hi:
Code:

bash-3.1# rsync -u /media/cdrom0/STORE1 /big/store1/
skipping directory /media/cdrom0/STORE1
bash-3.1#

As you can see, the problem here is that STORE1 and store1 are in fact different dir. names. But I wanted rsync to behave as if they were equal. What can I do? Regards.

Ehtetur 11-26-2010 09:55 PM

It's complaining about trying to copy the directory STORE1, but it won't without the --recursive switch...
If you only want to copy files then use:
Code:

rsync -u /media/cdrom0/STORE1/* /big/store1/

catkin 11-26-2010 10:27 PM

Or, more efficiently:
Code:

rsync -u /media/cdrom0/STORE1/ /big/store1/
From the rsync man page: "A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name".


All times are GMT -5. The time now is 04:35 AM.