Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!decwrl!ucbvax!dog.ee.lbl.gov!nosc!humu!pilikia!art From: art@pilikia.pegasus.com (Art Neilson) Newsgroups: comp.unix.shell,bnr.general Subject: Re: Comparing modified times of files Message-ID: <1991Mar10.220419.3391@pilikia.pegasus.com> Date: 10 Mar 91 22:04:19 GMT References: <1991Mar10.212854.3183@pilikia.pegasus.com> Distribution: comp Organization: Pilikia, Honolulu Lines: 17 In article <1991Mar10.212854.3183@pilikia.pegasus.com> art@pilikia.pegasus.com (Art Neilson) writes: >In article scottp@bwdlh504.bnr.ca (Scott Pace) writes: >>I would like to be able to compare two files' time stamps, to see which one >>is the oldest (or newest). How can I do this with sh? >How about: > >: >echo `ls -t $* | head -1` After posting this I realized the echo `` part was rather useless, it should be: : ls -t $* | head -1 -- Arthur W. Neilson III | INET: art@pilikia.pegasus.com Bank of Hawaii Tech Support | UUCP: uunet!ucsd!nosc!pilikia!art