Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Posts
    96

    Unanswered: how to find latest modified file

    dear all
    My requirement is to find the latest modified file in a directory can i achive this using find command in unix.
    Thanx in advance 4 any sugestions

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    This isn't a Sybase question so it shouldn't be in this forum but
    Code:
    ls -lrt
    Will list your files in the the order they've been modified. However if you only want to see the last file rather than all the files use tail
    Code:
    ls -lrt | tail -1
    and yes, you could use the find command but only if you're feeling brave

    Mike

  3. #3
    Join Date
    Mar 2008
    Posts
    96
    thanx a lot mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •