|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
rsync a single file
I have been using rsync scripts for a while and use them to sync directories across my servers. However i need to set up an rsync script to copy only one file from a server. Is this possible with rsync? If so how would i do this? I have looked on examples on the internet and only see examples for whole directories.
|
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Well, the man says path is a dir. You could rsync the parent dir and set the filter to exclude all others or include only this file.
rsyncd.conf(5) - Linux man page Another possibility is to work around it by putting the flat file alone in a new dir, and sym-link or link it to be acessible from the original path. Just note that a sym-link imposes a slight cost at open. While rsync of any kind of link may have various problems and restrictions, it will certainly work if both ends are single linked flat files in the new dir, and the original path has a sym-link to it. Whether the apps on both ends are happy opening the sym-links in orignal paths is an additional question. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Hi thanks, Been playing around trial and error style and tried some things. I tried: Code:
rsync -avz host:/path/to/file/file.csv /path/to/file/file.csv That seemed to only do the one file and the file looks like it updated. Thanks |
| Sponsored Links | ||
|
![]() |
| Tags |
| rsync single file |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unzip single file and untar single file | sureshg_sampat | Shell Programming and Scripting | 2 | 02-25-2010 10:23 AM |
| rsync - update file on backup when file renamed on source | coolatt | Shell Programming and Scripting | 2 | 02-08-2010 07:10 AM |
| rsync with particular file pattern | jw_712 | UNIX for Advanced & Expert Users | 2 | 08-17-2009 08:40 PM |
| single quote problem with rsync | mr_boysito | Shell Programming and Scripting | 9 | 12-05-2008 08:49 PM |
| Rsync file list | hexaplus | UNIX for Dummies Questions & Answers | 3 | 08-29-2006 01:27 PM |
|
|