Have Find print just the filenames, not full paths

后端 未结 5 627
迷失自我
迷失自我 2020-12-14 01:15

I\'m using the find command in a ksh script, and I\'m trying to retrieve just the filenames, rather than the full path. As in, I want it to return text.exe, not //severname/

5条回答
  •  粉色の甜心
    2020-12-14 01:40

    find ... -exec basename {} \; 
    

    will also do the trick .. but as @Kent asks, why do you want this?

提交回复
热议问题