Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve the last modified date

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I want to retrieve the last modified date(with the time) of
a file in Unix.Can you kindly give me the unix command for it?

thx
Beulah
 
ls -l

See also "man ls" and pay attention to -u, -c and -t

I often find it useful to use "ls -lut | head" when looking for recently USED files.
Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
I want to retrieve ONLY the date and ignore other informations like permission,author,etc..
 
Why? However, this will do what you require:

ls -ltr | tr -s ' ' ' ' | cut -d' ' -f6-8

HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top