bash - How to exclude folders and directory path from find command -


this question has answer here:

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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -