LS Command – How to Set ls -l Time Format

datelstime

I would like for all my ls commands that display a date, such as ls -l, to print the date column in a format of my choosing. Currently, I manually set this every time with --time-style. Is there any way of permanently setting this to, say, long-iso (as opposed to issuing ls -l --time-style="long-iso" on every invocation)?

Thanks

Best Answer

If you define an alias such as

alias ls='ls --time-style=long-iso'

then ls invocations which end up displaying dates will use that.