[ILUG] Backup script using bash, find & zip

Padraig Brady padraig at antefacto.com
Mon Mar 25 17:13:02 GMT 2002


Justin MacCarthy wrote:
> To change the question slightly;
> 
> 
>>>#get earliest mdate in the directory is [STARTDATE]
>>
> 

I'm not sure what date format you want, but it
should be easy to get from the following output
which gives the oldest file in the directory:

find /d/data -maxdepth 1 -printf "%p\t%T@\n" | sort -k2rn | tail -1

Padraig.





More information about the ILUG mailing list