User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 455,864 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,648 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums

compare and remove older files

Join Date: Jul 2008
Posts: 1
Reputation: ivorb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ivorb ivorb is offline Offline
Newbie Poster

compare and remove older files

  #1  
Jul 18th, 2008
Hi !
I am newish to scripting.
I have inherited an Apple Xserve running 10.4.11 server
There is a script run each night that creates an zipped archive of some data.
These can be quite large so I have to prune them regularly.
I need to check that the youngest file was last nights file.
I then need to check its size against previous files and if it is the same size or larger, then I can remove some of the previous files.

I know how to compare sizes and get rid of files older than a "time period", but I dont know how to glue this together. Can anyone assist please.

Regards and TIA

ivor
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 6:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC