How to set ls -lh with time and long date format in descending order in .bashrc
You are missing a -l
to turn on the long listing format and -t
to sort by modification time.
Do:
alias ll='ls -lt --color=auto --time-style=long-iso'
To include hidden files too:
alias ll='ls -alt --color=auto --time-style=long-iso'
To reverse the order of sorting, oldest first, add -r
:
alias ll='ls -ltr --color=auto --time-style=long-iso'
alias ll='ls -altr --color=auto --time-style=long-iso'