I have listed the names of the files which are to be deleted into a file. How can I pass the file to rm
command so that it should delete them one by one.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
If you have one file per line, one way to do it is:
The file list is given as input to the |
|||||||||||||
|
The above answer is fine in that it goes to great lengths to handle filesnames with spaces and "strange caracters". But the simplest way, if the file names are sane, is just (warning, bashism!):
For regular shell:
|
|||
|