On Monday 12 November 2007 17:13, ankIT WALiA wrote:
> Can anyone tell me, how to get latest created file from a folder to
> be used in shell script?

If you want the last file whose inode was modified (which is usually the 
same as the last file created):

ls -c | head -1

P.S. *nix has ``directories'', not ``folders'' ;)

Regards,

-- Raju
-- 
Raj Mathur                [EMAIL PROTECTED]      http://kandalaya.org/
 Freedom in Technology & Software || February 2008 || http://freed.in/
       GPG: 78D4 FC67 367F 40E2 0DD5  0FEF C968 D0EF CC68 D17F
PsyTrance & Chill: http://schizoid.in/   ||   It is the mind that moves

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Next Event: http://freed.in - February 22/23, 2008
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to