Coz its could be find in alot of subdirs like /home/server/backups/local_backups/1-1-2009/server/mysql/1-1-2009.sql /home/server/backups/local_backups/1-2-2009/server/mysql/1-2-2009.sql /home/server/backups/local_backups/1-3-2009/server/mysql/1-3-2009.sql
so any idea? Bugzilla from vap...@gentoo.org wrote: > > On Sunday 15 February 2009 10:32:15 tal396 wrote: >> hey, i created a backup dir that created backup every hours... >> there is any way to get the last file that created that is fomat is >> *.sql >> ? >> thats what i've done, but its not working so well... >> >> >> cd "/home/server/backups/local_backups/" ; find -type d | find . -name >> '*.sql' | tac | tail -1; > > why not just use `ls` and one of its sort options ? the ls man page > documents > how to sort by creation time > -mike > > > -- View this message in context: http://www.nabble.com/Help%3A-Bash-script-that-show-you-the-last-file-created--tp22023778p22031423.html Sent from the Gnu - Bash mailing list archive at Nabble.com.