Thursday, May 24, 2007

UNIX: get the last modified file in a dir

problem:
i need a command that will tell me the last modified file or dir

solution:
ls /the/dir/ -1 -t | head -1

No comments:

Post a Comment