This is going to be a "doh!" question, I'm sure.

I needed to copy a bunch of files from a directory tree -- but only
selected files (say all regular files that end in .foo).  I want the
destination tree to be created.  find(1) is what I find most useful
for specifying what files to match the files I want to move -- but I
can't seem to get a good xargs command to get the files in the
destination (ie create the dir if doesn't exist and copy the file).

rsync would also be good, but I can't get the --exclude and --include
options to work, either.

I used brute force and used find to generate the list of files, then
tar with --files-from option and then untarred in the destination.

Now I'm feeling dumb.  There must be a one-liner to do this.


-- 
Bill Moseley
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to