[ale] backup script part II

Geoffrey esoteric at 3times25.net
Fri Mar 18 13:45:27 EST 2005


Jay Loden wrote:
> I'm still working on a backup script in Bash, and everything was set up 
> perfectly, but for structural reasons I have to change what gets backed up. 
> (just when you think you've got it...) 
> 
> What I need is to backup only the last ten tar.bz2 files in the directory.   
> Can someone demonstrate how you do a for loop that would determine the ten 
> most recent files and then tar only those ten into one big tar file? 

ls -rt *tar.gz2| tail -10

> 
> I appreciate the help with this...Bash scripting is still very confusing for 
> me and my only alternative is to make it a Perl script.  I'm a Python 
> programmer and don't know any Perl, so neither is a great option.  I'd love 
> to write it in Python but the place I'm working doesn't want to have anything 
> around that isn't in Perl for support reasons. 
> 
> -Jay
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
> 


-- 
Until later, Geoffrey



More information about the Ale mailing list