Unix: How to delete files listed in a file

后端 未结 13 1601
遥遥无期
遥遥无期 2020-12-04 06:31

I have a long text file with list of file masks I want to delete

Example:

/tmp/aaa.jpg
/var/www1/*
/var/www/qwerty.php

I need delet

13条回答
  •  执笔经年
    2020-12-04 07:04

    Just to provide an another way, you can also simply use the following command

    $ cat to_remove
    /tmp/file1
    /tmp/file2
    /tmp/file3
    $ rm $( cat to_remove )
    

提交回复
热议问题