Using 'find' to return filenames without extension

前端 未结 9 1618
无人及你
无人及你 2020-12-15 22:37

I have a directory (with subdirectories), of which I want to find all files that have a \".ipynb\" extension. But I want the \'find\' command to just return me these filenam

9条回答
  •  佛祖请我去吃肉
    2020-12-15 22:59

    If there's no occurrence of this ".ipynb" string on any file name other than a suffix, then you can try this simpler way using tr:

    find . -type f -iname "*.ipynb" -print | tr -d ".ipbyn"
    

提交回复
热议问题