LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   cp command - update flag question (http://www.linuxquestions.org/questions/linux-general-1/cp-command-update-flag-question-786105/)

ssisbi 01-31-2010 11:19 PM

cp command - update flag question
 
my system is running cp version 5.97. i want to use it with the update flag to synchronize files and folders in another directory on the same system. however, i want to exclude particular files and/or folders when i execute the command. is this possible? if so, can someone please provide a working example?

thanks in advance

Tinkster 02-01-2010 02:49 AM

Hi, welcome to LQ!

With plain cp: no
With cp and scripting: yes, but cumbersome
Use rsync instead. Despite its name it works quite well
for local copies.


Cheers,
Tink

David the H. 02-01-2010 03:26 AM

For true two-way synchronization, unison is better than rsync. It's relatively easy to use and can be used both cli and through a gui frontend. And yes, it can be set up to exclude specific files and folders.

ssisbi 02-03-2010 03:47 AM

Quote:

Originally Posted by Tinkster (Post 3847996)
Hi, welcome to LQ!

With plain cp: no
With cp and scripting: yes, but cumbersome
Use rsync instead. Despite its name it works quite well
for local copies.


Cheers,
Tink

thanks for the welcome.

can you please provide me with an rsync working example?


All times are GMT -5. The time now is 05:16 PM.