I have a basic directory structure that I want to be able to copy in one of
two ways.
The base structure is /a/b/c under that structure I have /d/e and finally
files 'f'. I create a list of the /d/e/f files and put them in a file
and
then use:
rsync -auvP /a/b/c --files-from=myFileList targetBaseDir
That works fine and I end up with /targetBaseDir/d/e/f
Now what I also want to do is to ignore the /d/e directories, so basically
rsync the files 'fi at the bottom of the directory structure directly into
targetbaseDir to end up with a result of /targetBaseDir/f
Is this possible? I can't see an option that implies 'copy just basename
file'
I am using FC4 with the following version of rsync:
rsync --version
rsync version 2.6.8 protocol version 29
Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, ACLs, xattrs, symlinks,
batchfiles,
inplace, IPv6, 64-bit system inums, 64-bit internal inums
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
--
View this message in context:
http://www.nabble.com/copying-base-file-rather-than-complete-directory-structure-tf3585454.html#a10019371
Sent from the Samba - rsync mailing list archive at Nabble.com.
Matt McCutchen
2007-Apr-16 16:38 UTC
copying base file rather than complete directory structure
On 4/16/07, SteveT <steve@tucknotts.me.uk> wrote:> The base structure is /a/b/c under that structure I have /d/e and finally > files 'f'. I create a list of the /d/e/f files and put them in a file and > then use: > rsync -auvP /a/b/c --files-from=myFileList targetBaseDir[...]> Now what I also want to do is to ignore the /d/e directories, so basically > rsync the files 'fi at the bottom of the directory structure directly into > targetbaseDir to end up with a result of /targetBaseDir/f > > Is this possible? I can't see an option that implies 'copy just basename > file'You want --no-relative . Matt
Maybe Matching Threads
- Feature Request: "SayNumberFiles"
- Rsync and permissions - rsync version 2.6.4 protocol version 29
- [Bug 12378] New: why i cannot exclude dir/files if using option "--files-from"
- displaying contents of dispatch.fcgi rather than running it
- Need :through to work as has many rather than HABTM.