Exclude list of files from find

后端 未结 6 1946
北恋
北恋 2021-01-31 07:43

If I have a list of filenames in a text file that I want to exclude when I run find, how can I do that? For example, I want to do something like:

fi         


        
6条回答
  •  轮回少年
    2021-01-31 08:07

    I think you can try like

    find /dir \( -name "*.gz" ! -name skip_file1 ! -name skip_file2 ...so on \)
    

提交回复
热议问题