bash - How to exclude folders and directory path from find command -
this question has answer here:
- how file name linux `find`? 6 answers
i've got following command
find /tmp/sjohal/archivetest > list
however need output show filenames in folder without directory path.
what best way this?
my current output looks follows:
/tmp/sjohal/archivetest /tmp/sjohal/archivetest/test2 /tmp/sjohal/archivetest/test1 /tmp/sjohal/archivetest/test3 /tmp/sjohal/archivetest/list.txt
i require output show files:
test2 test1 test3
try using ls command: ls /tmp/sjohal/archivetest > list.txt
Comments
Post a Comment