LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-20-2009, 06:15 AM   #1
shavha
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Question Hi script to delete old backups which are 3day old


Hi

I want to create a script to delete old backups which are 3day old from my Linux box where do I start? I am new in this field please help
 
Old 05-20-2009, 07:10 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You can man for find. You can use find options to locate files older than 3 days and then remove it with rm command.

like
Code:
find /path/to/files -type f -ctime +3 | xargs rm -f
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
batch script help for backups investmentbnker75 Programming 5 11-26-2008 12:19 PM
Help with rsync command (or script) multiple file backups luis14 Linux - Software 3 11-08-2007 11:07 PM
script for automatic backups cucolin@ Linux - Software 7 03-29-2007 04:42 PM
Script that automates backups using ftp linuxmandrake Programming 4 11-25-2005 06:12 PM
cron script backups cbeach512 Linux - Newbie 1 01-06-2004 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration