User Tools

Site Tools


ls_usage

This is an old revision of the document!


Show file date in different date formats

tags | YYYY-MM-DD, YYYYMMDD, YYYYMMDD_HHMMSS

Use one of

--time-style='+%Y%m%d_%H%M%S'
--time-style='+%Y-%m-%d'
--time-style='+%Y%m%d'

For example

% ls -l --time-style='+%Y%m%d_%H%M%S' ~/.vimrc
-rwx------ 1 rajulocal rajulocal 1112 20201017_141554 /home/rajulocal/.vimrc*

% ls -l --time-style='+%Y-%m-%d' ~/.vimrc
-rwx------ 1 rajulocal rajulocal 1112 2020-10-17 /home/rajulocal/.vimrc*

% ls -l --time-style='+%Y%m%d' ~/.vimrc 
-rwx------ 1 rajulocal rajulocal 1112 20201017 /home/rajulocal/.vimrc*
ls_usage.1610747603.txt.gz · Last modified: 2021/01/15 21:53 by raju