time format..

HI..

I have some files...when doing "ls -l" its like this..
-rwxr-xr-x 1 e2e e2e 747 Aug 30 15:18 abc.txt

how can I get the number YYYYMMDD from this...( since I need to compare this number with some other value..)
with the help of date/awk/sed/epoch or whatever u prefer..

Thanks..

'd be greatful if u 'd also suggesset the YYYYMMDDHHMMSS

if your "ls" supports --full-time option, maybe you can use it.

ls -ltr --full-time

else you can also try the stat command if you have it,
else you can use Perl or others that provide functions to "stat" files.