1

Solaris + display file time stamp [year][month][day]

view story
linux-howto

http://unix.stackexchange.com – I have Solaris 10 machine I need to verify time stamp of some file in my Solaris machine And to get the following format [year][month][day] Example of working command on Linux ls -l --time-style=+%Y%m%d /etc/hosts | awk '{print $6}' 20121107 <----- ( expected results ) remark I can't to install gnu ls on My solaris machine! On my solaris machine I try the following commands but all them not works ( because Solaris flags are different from Linux ) , and stat command not defined in my Solaris # ls -l -T -D %Y%m%d /etc/hosts ls: illegal option -- T ls: illegal opt (HowTos)