Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'another way to remove a list of files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
another way to remove a list of files
Authored by: bking on Sep 17, '01 05:18:45PM

While pkg-remove is probably the correct answer to this question,
you can remove a list of files by doing this:
'cat file_list | xargs rm'

Where 'file_list' is a file containing the names of the files to delete.
The filenames should be in the current directory or have a valid path.

you can test it like this:

touch foo1 foo2 foo3 foo4
ls -1 foo? > file_list
ls foo?
cat file_list
cat file_list | xargs rm
ls foo?



[ Reply to This | # ]