How can I write a shell script to transfer files and keep permissions?
Searching for answers to my question, the closest I can find is linuxquestions.org/questions/showthread.php?s=&threadid=291713
(sorry that's not linked - this forum won't let me post URLs yet because of a "five post" restriction rule)
Basically I am in the process of adding ethernet to some school computers (a real relief because I've become very sick and tired of using floppies to transfer files between them) and I'm wanting to make shell scripts in order to distribute files, and later possibly work towards having a shared drive.
However, apart from running a few commands to set up the network with separate IP addys etc, I don't know much about networking.
A lot of the computers have clone directories. e.g: the students all have a /home/<student_name> dir. Depending on which computer a student was working on, files of the same name may be more up to date on one computer than another etc etc. I will want to rsync these before finally switching the contents over to a common shared drive.
.....I should say I've not used rsync before and am mainly comfortable with using commands like... \cp -purf <source_dir> <dest_dir> for this kind of operation.
How do I write a shell script which includes standard cp commands but accross networked computers?
Also - can I include options to transfer entire tree branches (subdirs) as well as preserving ownership, creation date, permissions etc?
|