Friday, March 2, 2012

linux date command fields without zeros

With zero
root@li60:~/security# date --date "1 day ago" "+%b %d"
Mar 01

Without zero
root@li60:~/security# date --date "1 day ago" "+%b %-d"
Mar 1

1 comment: