Originally Posted by colucix
I don't know in Mac OS X, but using GNU ls you can try the --time-style option, to custom the way the modification time is displayed. For example:
ls --time-style=+%Y%m%d -l mynewfile.txt
thanks for the suggestion colucix. It seems that option is not supported in standard mac osx. but thats ok.
see i could alternatively have:
date -r `stat -f "%Dm" mynewfile.txt ` +"%Y%m%d"
but then I have this problem with using that in a script and assigning to a variable.
MODDATE=`date -r `stat -f "%Dm" mynewfile.txt ` +"%Y%m%d"`
has to become:
MODDATE=`date -r $(stat -f "%Dm" mynewfile.txt) +"%Y%m%d"`
ok I think I am nitpicking now...you may close this thread