[Tfug] Need help with a complicated command line copy...

Andrew Ayre andy at britishideas.com
Wed Jun 27 15:18:12 MST 2007


Perhaps something like:

find --regex .*pdf

might help? I believe it can/does recurse. You can then pipe the results
to a copy.

Andy

Tyler Kilian wrote:
> I'm rusty now, but you could do this with a shell script by using find to
> provide a list of files and then doing a cp to move the file you found
> (which has a path associated with it now from the find output) into a
> predetermined location.
> 
> The other option is to not have Jon block identd.
> 
> Tyler
> 
>> Guys,
>>
>> I have a complicated problem.
>>
>> I have a stack of old hard disks with data a friend wants extracted.
>> There are a lot of duplicates, and of course they're scattered across
>> multiple subdirectories.
>>
>> The file types are as you'd expect: .pdf, .doc, .xls, etc.
>>
>> At the DOS command line I'd have trouble with this: I could use XCOPY
>> to move the files (based on extension) from disk to disk including
>> subdirectories, but In this case I don't WANT the target-location
>> files to be in subdirectories.  Instead, as I pile the files into the
>> target location I want to keep them all in one, and as new ones try
>> and come in retain the one with the latest datestamp.
>>
>> I'm using standard Ubuntu Feisty so I figure there has to be a way to
>> skin this cat at the command line, probably with standard tools but,
>> maybe with some add-in package?  Any tips would be welcome :).
>>
>> Thanks!
>>
>> Jim
>>
>> _______________________________________________
>> Tucson Free Unix Group - tfug at tfug.org
>> Subscription Options:
>> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>>
> 
> 
> 
> --
> Tyler Kilian
> Krispy Kreme - The Edible Linux
> 
> 
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
> 
> 

-- 
Andy
PGP Key ID: 0x67090A54




More information about the tfug mailing list