This blog contains Linux / Unix Tips and Tricks, collected during my work as a Unix System Administrator.
They are here for my own reference, but they might help you as well !
len | 11 December, 2008 21:34
Suppose you want to copy a directory structure from one machine to the other.
You could create an archive (using tar or cpio), copy over the archive and extract it.
But there's a better way to do it by combining tar and ssh.
Suppose you want to copy all data in /opt/data on machine1 to the directory /backup/data of machine2:
On machine1:
# cd /opt/data
This will copy all data in /opt/data to machine2:/backup/data without the need of a temporary archive file.
This method will preserve all file and directory permissions, time stamps, symbolic links, etc.
Len Kranendonk
Unix System Specialist.
Broad experience in web development and open source technologies.
| « | December 2008 | » | ||||
|---|---|---|---|---|---|---|
| Mo | Tu | We | Th | Fr | Sa | Su |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||