Hi all, I am looking for to only sync directories and files structures only, without coping any data within files... Is there a switch/trick available for this in rsync? Thanks for any suggestions. -- Sincerely, Nick A Gordun mailto:dataplus@univ.kiev.ua
On Thu, Mar 15, 2007 at 10:44:08AM +0200, Nick A Gordun wrote:> I am looking for to only sync directories and files structures only, > without coping any data within files...You can sync just directories by excluding everything else. In a modern rsync, that is this filter option, which says to exclude everything that is not a directory: -f '-! */' In older rsync versions, you must specify both an include of all directories, and an exclude of everything else: --include='*/' --exclude='*' It cannot copy any other "file structures" other than the files themselves, which includes data. ..wayne..
On Thu, Mar 15, 2007 at 10:44:08AM +0200, Nick A Gordun wrote:> I am looking for to only sync directories and files structures only, > without coping any data within files...On 3/15/07, Wayne Davison <wayned@samba.org> wrote:> It cannot copy any other "file structures" other than the files > themselves, which includes data.Nick, If by copying "file structures" you mean that you want an empty file on the destination corresponding to each source file, you could compile a copy of rsync patched with "patches/source-filter_dest-filter.diff" and then specify a source filter like "/bin/true". Matt