[NTLUG:Discuss] Re: copy a list to a new directory

Robert Citek rwcitek at alum.calberkeley.org
Tue May 18 00:47:06 CDT 2004


On Tuesday, May 11, 2004, at 14:52 US/Central, Bobby Wrenn wrote:
> Chris Cox wrote:
>> Chris Cox wrote:
>> ...
>>> or if the list isn't too long...
>>>
>>> cp $(<list_of_files) .
>> That one is bask/ksh specific... in case you were wondering.
>> And I'm assuming the list_of_files contains qualified pathnames.
> Yes it did. This is the one I used because it was the simplest for a 
> list of 80 files.

If the list would have been too long, xargs is your friend:

   $ < list_of_files xargs cp --target-directory=.

Regards,
- Robert




More information about the Discuss mailing list