find all files except e.g. *.xml files in shell

前端 未结 6 1748
天命终不由人
天命终不由人 2021-01-04 07:09

Using bash, how to find files in a directory structure except for *.xml files? I\'m just trying to use

find . -regex ....

regexe:

6条回答
  •  鱼传尺愫
    2021-01-04 07:42

    Try something like this for a regex solution:

    find . -regextype posix-extended -not -regex '^.*\.xml$'
    

提交回复
热议问题