Ask HN: What tricks and tips do you know for $ls Linux command? Thank you

4 points by gotac ↗ HN
What tricks & tips do you know for $ls Linux command?

I found few of them interesting:

$ls -d */ # to list all directories from current location

$ls -l | grep '^-' # to list all regular files from current location

$ls -l --time-style=long-iso # print time format yyyy-mm-dd hh:mm

Other nice combinations:

$ls -Qm # output between quotes delimited by a comma

$ls -alsSh # print all files in a long list format, using size option + sort, in a human readable format

2 comments

[ 3.0 ms ] story [ 13.1 ms ] thread
ls -ltr or ll -tr if you have it aliased like Ubuntu

Verbose list in reverse order by time (newest last, so it appears closest to the cursor if you're looking for most recently modified).

Thank you, good combination