Delete files from a text file

Delete files from a text file

If you got a list of file to delete, save them in a text file then run this command:

while read -r file; do rm — “$file”; done < file_to_delete.txt

Leave a Reply

Your email address will not be published. Required fields are marked *