May 292014
How to get file name only with find command?
Answer:
To show only the filename of Linux command, you can use
# find /dir -type f -printf "%f\n"
file1
file2
file3
...
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to get file name only with find command?
Answer:
To show only the filename of Linux command, you can use
# find /dir -type f -printf "%f\n"
file1
file2
file3
...