LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-19-2011, 10:02 PM   #1
illumilore
LQ Newbie
 
Registered: Feb 2011
Posts: 7

Rep: Reputation: 0
make rsync ignore directory structure?


Is there a way to force rsync to not make directories in its destination directory; ie, to simply dump all of the files from the source directory directly into the destination without copying any of the folders that the files were originally in?

I tried --no-dirs, but that seems to only be for empty directories.
 
Old 04-20-2011, 01:46 AM   #2
A.Thyssen
Member
 
Registered: May 2006
Location: Brisbane, Australia
Posts: 119

Rep: Reputation: 32
You will need to specify each file separatally. perhaps.

find directory -type f -print0 | xargs -I@ rsync @ destination/

You can speed this up by replacing xargs with something like parellel
or doing some extra handling of arguments. EG

find ... | xargs -- sh -c 'rsync "$@" destination' 'ss'

The 'ss' is needed otherwise the first argument will become $0 and not $1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rsync with changing directory structure dormant Linux - Software 6 08-28-2010 04:32 PM
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 10:18 AM
how do I make a sensible list from a directory structure? oskar Linux - General 2 06-25-2008 01:27 PM
RSYNC Directory Structure? carlosinfl Linux - General 2 09-18-2007 02:58 PM
How to make RSYNC skip a directory due to error message ArchW Linux - Networking 5 07-13-2006 11:26 AM


All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration