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 397,646 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 2,382 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:
Views: 420 | Replies: 1
Reply
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  
Join Date: Apr 2008
Posts: 39
Reputation: omrsafetyo is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 8
omrsafetyo omrsafetyo is offline Offline
Light Poster

Re: compare and remove older files

  #2  
Jul 23rd, 2008
Which part are you having trouble with?

I would have to know a little bit more about the naming scheme of your zip files and etc.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Shell Scripting Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 11:07 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC