How to strip leading “./” in unix “find”?

前端 未结 7 1935
盖世英雄少女心
盖世英雄少女心 2020-11-29 17:14
find . -type f -print

prints out

./file1
./file2
./file3

Any way to make it print

file1
file2
fil         


        
7条回答
  •  既然无缘
    2020-11-29 17:40

    Another way of stripping the ./ is by using cut like:

    find -type f | cut -c3-
    

    Further explanation can be found here

提交回复
热议问题