find command: trying to specify number of results to display
so im fiddling around with commands trying to learn scripts and i am trying to find the oldest file on the system.
I did 'find -iname / "*.*" -atime +300 -exec ls -lart -1 {} \;
and it seems to work fine but prints out several files and I only want the top most one -- the largest.
Is there a way to output only the first displayed result of this command or any other commands such as ls and stuff?
Last edited by dave247; 11-03-2008 at 01:28 PM.
|