Thursday, March 13, 2014

BASH - remove (or do something) with a list of files (in text file)

Slow: 

while read -r filename; do
  rm "$filename"
done <list.txt


For a few arguments):
 rm -f $(<list.txt)



I think it should work:

xargs -a list.txt -d'\n' rm

No comments: