Unix questions - Re: zip up files listed in a file

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > November 2005 > Re: zip up files listed in a file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: zip up files listed in a file
Michael Tosch

2005-11-04, 5:57 pm

david@tvis.co.uk wrote:
> Hi
> Neither solution works for me
>
> $ zip all.zip $(cat list.txt)
> zip warning: name not matched: x1
> zip warning: name not matched: x2
> zip warning: name not matched: x3
>
> does work if I join all the lines of list.txt into one long line eg
> x1 x2 x3
>


I guess you have created a DOS style .txt file.
Then convert to Unix via "dos2unix".
E.g.

dos2unix list.txt | xargs zip all.zip


--
Michael Tosch @ hp : com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com