date -r switch missing on solaris 10

Hi. My Bash script:

date -r $PATH/$file'+DATE MODIFIED: %m/%d/%y TIME:%H:%M:%S'

works on our Solaris 8 server i.e.,:
DATE MODIFIED: 03/10/08 TIME:19:19:48

but fails on Solaris 10 with this error:

date: illegal option -- r
usage:  date [-u] mmddHHMM[[cc]yy][.SS]
        date [-u] [+format]
        date -a [-]sss[.fff]

What's the remedy?  I need to print out the date modified for a file in a script that processes a list of files.  I need to be able to run this on both boxes.

Thanks for any help,

Mirek
drozdzowskiAsked:
Who is Participating?
 
gheistCommented:
Not a POSIX switch.
ls command has manual and lists file times.
0
 
omarfaridCommented:
0
 
drozdzowskiAuthor Commented:
Thank you.  This also explains why some other commands where not working on our out-of-the-box new server, such as 'whoami'.

Mirek

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.