[root@localhost niu]# chown student.student *
[root@localhost niu]# ls -l
total 0
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file1
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file2
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file3
[root@localhost mnt]# rsync -r niu/ root@172.25.254.177:/mnt/
在主机177里面进行查看:
[root@localhost mnt]# ls -l
total 0
-rwxrwxrwx 1 root root 0 Jul 26 09:00 file1
-rwxrwxrwx 1 root root 0 Jul 26 09:00 file2
-rwxrwxrwx 1 root root 0 Jul 26 09:00 file3
- 在97主机下使用rsync -rp niu/ root@172.25.254.177:/mnt/的操作:
[root@localhost mnt]# rsync -rp niu/ root@172.25.254.177:/mnt/
在177主机下进行测试 : (文件的权限相同的)
[root@localhost mnt]# ls -l
total 0
-rwxrwxrwx 1 root root 0 Jul 26 09:00 file1
-rwxrwxrwx 1 root root 0 Jul 26 09:00 file2
-rwxrwxrwx 1 root root 0 Jul 26 09:00 file3
- 在97主机下使用rsync -rpogt niu/ root@172.25.254.177:/mnt/的操作:
[root@localhost niu]# ls -l
total 0
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file1
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file2
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file3
[root@localhost mnt]# rsync -rpogt niu/ root@172.25.254.177:/mnt/
root@172.25.254.177‘s password:
在177主机下测试:
[root@localhost mnt]# ls -l
total 0
-rwxrwxrwx 1 student
student 0 Jul 26
08:49 file1
-rwxrwxrwx 1 student
student 0 Jul 26
08:49 file2
-rwxrwxrwx 1 student
student 0 Jul 26
08:49 file3
[root@localhost niu]# ln -s file1 /mnt/niu/westos
[root@localhost niu]# ls -l
total 0
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file1
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file2
-rwxrwxrwx. 1 student student 0 Jul 26 08:49 file3
lrwxrwxrwx. 1 root root 5 Jul 26 09:28 westos -> file1
[root@localhost mnt]# rsync -rl niu/ root@172.25.254.177:/mnt/
root@172.25.254.177‘s password:
[root@localhost mnt]# ls /dev/pts/
0 ptmx
[root@localhost mnt]# rsync -rD /dev/pts/ root@172.25.254.177:/mnt/
root@172.25.254.177‘s password:
在177主机下:
[root@localhost mnt]# ls
0 ptmx