UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 29th, 2005, 08:38 PM
Veus Veus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 11 Veus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 46 m 48 sec
Reputation Power: 0
Delete folders in shell script after so many backups

Hi,

I have a backup script which copies the home dir to an external hard drive every 6 hours.
What i want to know is if there is a command i can put at the end of my backup script which will only keep the last 4 backups. All the others can be deleted.

My dir structure is:

-Root
--Day
---Daily Backup
--Week
---Weekly Backup
--Month
---Monthly Backup
--6 Hour Backup1
--6 Hour Backup2
--6 Hour Backup3
--6 Hour Backup4
--6 Hour Backup5
--6 Hour Backup6
e.t.c

So this means i cant just delete all the directories only the ones which follow the pattern of the 6 hour backups (regexp?)

Any ideas?

Thanks in advance

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Delete folders in shell script after so many backups


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT