subject - print file date on solaris as format: yymmdd ( yy - year , mm - month , dd - day )
on Linux machine I type the following command in order to get: file date
as the following:
ls -l --time-style=+%Y%m%d /etc/hosts | awk '{print $6}'
20121107
.
please advice what the syntax for Solaris ? , because I get error when I try to run it on Solaris:
.
ls -l --time-style=+%Y%m%d /etc/hosts
ls: illegal option -- time-style=+%Y%m%d
ls
in solaris differs from gnu ls. So the parameter--time-style
is not availiable in Solaris.man ls
and see your options