On Monday 22 November 2004 13:30, debian-user-digest-request@lists.debian.org wrote: > ls -ltr > > This gives a listing of files in the current dir with the most > recently altered one last. To get only the name of that last one use: > > ls -tr | tail -1 Thanks. That indeed does it. Did not know how to use tail here. Now, how do I use it in a script, such as $LASTFILE = ????? do something using $LASTFILE