![]() We can also use the cp command to copy directories recursively, as well as preserve attributes and ownership. This behavior is the same as the cp command. Finally, note that when we rsync the file, it changes the ownership to the user who executed the command (root, in this case).Īll this is important if we want to make backups. Therefore, as far as the filesystem is concerned, it's a totally different file (because it is-it copied all the information each time). Also, each time it copies a file, it gives the file a new inode number. First, when we re-ran rsync, it re-copied testfoo and updated the atime. foo and re-sync: enable]# touch enable]# rsync. Like the mv and cp command, in its most basic form rsync just needs a source and a destination: enable]# rsync. ![]() So it's no surprise that it's a favorite of many systems administrators. It uses multiple types of remote access clients (SSH and RSH, for example).It compresses and encrypts the data stream.It runs as a command and can be scripted.It keeps two sets of files up to date and synchronized.However, it's much more powerful than that. Most simply, rsync is a tool for copying files. It is such a useful and flexible tool that it's included in every version of Linux and has been ported to other operating systems. Rsync was created by one of the same people who invented Samba, Andrew Tridgell. One of my favorite tools for solving both problems is called rsync. How well do you know Linux? Take a quiz and get a badgeĪs a sysadmin, I spend most of my energy on two things (other than making sure there is coffee): Worrying about having backups and figuring out the simplest, best way to do things.Linux system administration skills assessment.A guide to installing applications on Linux. ![]()
0 Comments
Leave a Reply. |