3 ms·
You can also use basename with the find command $ find ./tmp -maxdepth 1 -type f -exec basename {} \; b a c I don't know the downsides of usin
by iib 6y ago
You can also use basename with the find command
$ find ./tmp -maxdepth 1 -type f -exec basename {} \;
b
a
c
I don't know the downsides of using basename though.
- rmetzler 6y agofrom all the solutions, this seems to be the most simple with readily available tools. Unfortunately it's still not as short as I would like it to be and I hope I remember the syntax with -exec $CMD {} \; the next time I need it. Thanks to all the helpers, who took their time to propose solutions. But what I was trying to say is: I would be ok with adding a new command to the tools I use on my machine, VMs and containers. fzf, fd, rg are tools which make my life easier. I would prefer to have the features of fls in ls itself or a tool similar to fls in coreutils, moreutils or another package .