Remove a list of files as held within a file

Question:
How to remove multiple files as listed within a file

An example file called 'list.txt' may contain the following:

/tmp/jar.png
/mike/www/*
/var/www/html/test.php

To remove them simply enter:

for f in $(cat list.txt); do
  rm $f
done

Or if you don't have any patterns, then it can be done using xargs:

xargs rm < list.txt
Taxonomy: