- 1 different machine copy files
- SCP file Login user @ Machine ip:/Directory/Sub-directory
- SCP filename [email protected]10.20. 130.202:/home/test/
- 2 file [clip] Sync rsync
- Question [NET friend proposed]
- How do I write a command of a Linux value that copies one or several subdirectories? If there are several directories under/project,/project/aaa/project/ccc/project/ddd .... I want to copy the PROJECT/AAA into the/tmp directory, the project directory is also copied (and you don't want to use mkdir to create project in the TMP directory first.) Because this is just an example), I actually want to back up the system, that is, some folders and files in a directory to backup, but some folders and files are not copied, such as log folders, etc.
- Look at the following directory
- [[email protected] dass] # ll
- Total 260
- Drwxrwxr-x 7 dass dass 4096 Oct bonus-portal
- Drwxrwxr-x 8 dass dass 4096 Mar cis-portal
- DRWXRWXRWX 6 201 201 4096 Nov cronolog-1.6. 2
- -rw-rw-r-- 1 dass dass 193967 Oct cronolog-1.6. 2.tgz
- Drwxr-xr-x 8 dass dass 4096 Oct iad-api
- Drwxr-xr-x 8 dass dass 4096 Oct ias-api
- Drwxr-xr-x 8 dass dass 4096 Oct ias-iboss
- Drwxrwxr-x 7 dass dass 4096 Oct info-portal
- Drwxrwxr-x 7 dass dass 4096 Oct pis-portal
- Drwxrwxr-x 7 dass dass 4096 Apr 4 pp_tomcat6
- Drwxr-xr-x 7 dass dass 4096 Nov regist-api
- Drwxrwxr-x 7 dass dass 4096 Oct sis-portal
- Drwxrwxr-x 7 dass dass 4096 3 :sqxx-portal
- Drwxr-xr-x dass dass 4096 Oct ( tomcat )
- Drwxrwxr-x 7 dass dass 4096 Oct tvs-portal
- Drwxr-xr-x 7 dass dass 4096 Nov vod-img-task
- Drwxr-xr-x 7 dass dass 4096 Oct vod-portal
- [[email protected] dass] # pwd
- /opt/dass
- Just want to copy the/opt/dass/tomcat directory to/tmp
- Execute the following command:
- Rsync-ar/opt/dass/tomcat/tmp
- What is Rsync?
- SHANGHAI-big wave scouring sand () :
- Synchronization commands
- And you can sync it to another machine.
- Pingxiang-Mark Hurd () :
- Oh
- SHANGHAI-big wave scouring sand () :
- The same file will not be copied again
- Pingxiang-Mark Hurd () :
- As if it was a RAC or something.
- SHANGHAI-Big Wave Amoy () :
- Why I only add-R No,-ar on the line-a see man is archive
- Man can't understand, ah, can use on the line!
- Shanghai-miracle (): :
- It is a quick means of saying you want recursion and want to preserve almost everything-a this should be allowed to be recursive and reserved permissions
- SHANGHAI-Big wave Amoy :
- Well
- Shanghai-miracle () :
- If you have a hard link, add-h
http://hehaibo.iteye.com/blog/1326495