Deleting Files Older Than 30 Days

Jan 31, 2008

On a Red Hat server, how can I delete files in a specific directory that are older than 30 days?

View 7 Replies


ADVERTISEMENT

Deleting Spam Older Than X Days Need A Simpler Solution

Jan 21, 2009

I have a Bash script that deletes Spam from all users .Spam mailboxes that is older than X number of days

Currently I just list the paths to each mailbox i.e.

/var/vmail/Domain1.com/Mailbox1/.Spam/* -type f -mtime +5 -exec rm {} ;
/var/vmail/Domain1.com/Mailbox2/.Spam/* -type f -mtime +5 -exec rm {} ;
/var/vmail/Domain2.com/Mailbox1/.Spam/* -type f -mtime +5 -exec rm {} ;
/var/vmail/Domain2.com/Mailbox2/.Spam/* -type f -mtime +5 -exec rm {} ;

This is becoming unmanageable as the number of mailboxes grows I have to add each to my script

I tried putting wildcards in i.e.

/var/vmail/*/*/.Spam but this does not work

Is there a way to do this? Maybe running some kind of command to create an array of paths then looping through them?

View 5 Replies View Related

Cron Job That Deletes Backup Files Older Than 5 Days

May 31, 2009

This is on a RHEL 4 Box.

I want to create a cron job that deletes backup files that are older than 5 days. I have created a shell script (/usr/local/src/runjob.sh) that runs successfully from the SSH command line:

Code:
#pwd
/usr/local/src
#./runjob.sh
Here is the script:

Code:
#!/bin/sh
#

#
find /usr/local/apache/sites/*/BACKUPS/ -maxdepth 1 -atime +5 -iname 'test*.txt' -exec rm {} ;
Script has 777 permissions and is owned by root.

I have the following entry in crontab:

Code:
10 12 * * * /bin/sh /usr/local/src/runjob.sh >/dev/null 2>&1

As shown in the cron log, the job does run, but it does not delete the files. And there are files older than 5 days in the directory that meet the find criteria.

View 12 Replies View Related

Cron/ssh To Remove Folders Older Than X Days

Feb 27, 2009

I'm trying to write a cron/ssh to remove recursive folders in a "data" folder that is older than X days.

I've been able to remove files, but not folders.

This is the code I have so far, but if someone can point out how to remove folders older than X days, that'd be great ........

View 4 Replies View Related

Plesk 12.x / Linux :: Courier IMAP And Auto Deleting Trash After 7 Days

Feb 20, 2015

I'm trying to find Courier IMAP config: /etc/courier/imapd

Because i would like to edit the parameters for the trash folder (see qoute and link below)

The file on my server is not there. I did some grep and locate commands and was unable to find it.

##NAME: IMAP_EMPTYTRASH:0
#
# The following setting is optional, and causes messages from the given
# folder to be automatically deleted after the given number of days.
# IMAP_EMPTYTRASH is a comma-separated list of folder:days. The default
# setting, below, purges 7 day old messages from the Trash folder.
# Another useful setting would be:
#
# IMAP_EMPTYTRASH=Trash:7,Sent:30

[Code] ....

View 1 Replies View Related

Deleting The Old Files

Jul 10, 2007

I've an upload directory and it have an very old files from 2005 so i wanna to delete all files that in this date because they make bandwindth on my server so how i can do this to delete them all , all files before 24 month .

View 9 Replies View Related

Virpus = Ticket 11 Days Old, Started Working On Issue 6 Days Ago, No Word For 4 Days

Nov 28, 2008

Virpus = Ticket 11 days old, started working on issue 6 days ago, no word for 4 days!

Thats Virpuss customer service and its plain silly.

View 11 Replies View Related

Host Deleting Files

Aug 23, 2008

how bad is it for a host to delete a file and not tell you that they deleted it?

View 14 Replies View Related

Deleting Files Automatically

Oct 11, 2007

Is there a way to automatically remove files from a folder on a schedule, say daily, and move them to the Recycle Bin? Can the Recycle Bin files be deleted daily on a schedule? If so, how?

I have Microsoft Office Professional 2007 running on a Windows 2003 Server.

View 2 Replies View Related

SSH Commands - Deleting Files And Escaping Characters

Jun 26, 2008

I have two quick questions.

Question 1
I had a script create a backup of every file on my site using the following format "filename.php.bac". I want to delete these files now and I tired to use "rm *.bac" but that only deleted the files in the current directory. How can I delete ALL those files in EVERY directory and sub-directory starting at the public_html directory?

Question 2
How can I escape semi-colon's (;) in a perl script? I'm trying to run a search+replace script to update some Analytics code and I have a ton of files to update but for some reason if there is a semi-colon in the find varable, it assumes that it has reached the end of the contents in that variable.

Here is the code. Take a look at the $find variable and you will see extra semi-colon's. How do I tell the script to not treat those semi-colons as the end of the variable? .........

View 5 Replies View Related

SpamAssassin - Deleting Files From /home/user/.spamassassin

Jun 25, 2009

I need to clean up the .spamassassin directory for all the accounts on the server. The Bayes files are getting too big and causing mail handling issues.

How would I do that?

I assume this won't work - and don't want to try it until I hear a little feedback:

rm -f /home/*/.spamassassin/*bayes*

Basically, I need a command that will do what the above command looks like it would do - I just don't think the wildcards will work in that manner, and don't want to try it for fear of deleting items outside of the .spamassassin directory.

I'm running CentOS 5.3.x with cPanel/WHM - if it matters...

And feel free to suggest other spam blocking software - but we've gotten rather good at tweaking SA to get the job done. Just this annoyance of the bayes files growing continuously is a pain sometimes...

View 7 Replies View Related

Servage Say "we Give 14 Days Grace" But Then Suspend Account In 5 Days

Apr 5, 2008

I guess you can fugure my account expired with servage.
but to tell you the truth, I am so P OFF at them

I opened a ticket on my last day and asked if I can move it from 14 months (that I started with) to a 6 months renewal because I could'nt afford to pay the £74 they wanted, and apologised for this. They said I'd have to pay the 74 pounds first and then change my billing to 3 or 6 months.....

I replied saying can I then pay a sum now and a some next week. as I don't have that with me at the moment but wednesday 9th April I wil be able to remew it all

They replied with:

"Hello Ahmed
there is 14 days grace period for customers before account gets suspended."

So I thanked them very much, because like that, instead of paying in installments, I can just pay them the whole amount before the grace period was over, otherwise I would've backed up my data and moved it another server, or on my computer till I remew the whole amount....

5 days later (today), I log on to my account, and it has been suspended as I hav'nt paid for 5 days...thats 9 days before the "grace period"

and now all my domains have this dirty suspended page that they have, and I bet I lost half my members and customers like this, as when I see this page on any domain I enter I never go back to it!

I say to my self its my falt, I should've paid when I had to.....but money was tight, and I told them....and they gave me the 14 days, I did'nt ask for anything, but I thought backing up all my sites and my webdriver that I have with them would take me ages, plus the pages have alot of content that would be a hassle, if I have a "14 days grace period".

This is the first time servage have lied to my face, and not by answering a question with yes or no, by saying a feature they have that does'nt exist and but wednesday I bet all my customers and members would've found somewhere else to hang out, as I only contacted them through the mail server on the site and my forum, now I can't even right "we will be back soon....don't go away",

I thought I warn you guys about this grace, if you have an account with them make sure your ready to renew before it expires, and don't believe most of the stuff that they say.

OMG, I used to promote for these people, and tried hard to always say good stuff about them, you see my sig, it was a promotion for them with a coupon code (that I dredfully apologies about to the administration for not reading the rules properly), and I get in return a lie straight in my face with no warning and no way of accessing my database what so ever.
Just be warned Guys, don't believe everything they say to you and backup all the time because you never know why they suspend your account.....even if your on thew right track

View 6 Replies View Related

[Powervps] Older VPSs Are Better Then Newest

Aug 7, 2007

what's going inside my provider Powervps/Defender hosting, they are offering now 25% OFF of new customers + triply bandwidth.

Curent customers are not allowod to get this offer, until they order a new VPS and cancel the older.

I'm asking, because i feel, it's samething, why they don't go upgarading the account throughly with keeping IPs and data..? why do old customers need to cancel the old VPS then they go get a new VPS..?

are Old VPSs powerfully then the newest..? any informations...?

View 6 Replies View Related

How To Find And Delete Images 1 Year Older?

Nov 4, 2009

I run a photo image hosting. how do I find and delete photos that are 1 year older?

Can this be done by GUI?

Command?

Is there a tool for this?

View 9 Replies View Related

How To Delete All Mails On Server Older Than X Years

Apr 6, 2008

Is there a script for whm that deletes all mails older than XX years for all accounts on the server?

View 1 Replies View Related

Plesk 11.x / Windows :: Install Older WordPress Version?

Nov 4, 2013

how to install older version of WordPress - version 3.7 has just come out and it is the only version I can install via the Plesk panel but unfortunately half of the themes out there only support up to 3.6

View 6 Replies View Related

Deleting /tmp Content

Apr 1, 2007

any problem to delete /tmp content?

View 7 Replies View Related

Deleting Old Mail

Dec 13, 2007

There is a mailbox which is slightly over 250mB

The problem is that mail is usually downloaded without having the copy on the server deleted.

What is the easiest way of deleting all mail older than 14days?

(using cpanel, if it helps)

View 3 Replies View Related

Deleting Emails In Bulk

Apr 19, 2009

WHT, wow been a while, but anyway i have a client whose hosting account has way tooo many emails, he mentioned to me that he doesnt need them, i logged into his email annd they are more than 500 pages of emails, how would i delete them in WHM without going 1 by 1 or page by page..(even with that they still go to trash)

View 8 Replies View Related

Unmounting Amd Deleting Loop

Jul 1, 2008

I am writing on this forum and I am hopping some will help me. I have an issue with unmounting and deleting the /dev/loop0 on my host machine. Below is the error I am getting:

# losetup -d /dev/loop0
ioctl: LOOP_CLR_FD: Device or resource busy

View 2 Replies View Related

Deleting All Email From Mailbox

Dec 29, 2007

I am running cpanel and am trying to delete all mail from one particular mailbox. What is the command for doing this? I thought it was this:

# cd /home/USER/mail/
# echo > inbox

However that does not seem to work?

View 4 Replies View Related

Deleting Accounts Won't Free VPS Diskspace

Sep 10, 2008

I have terminated several reseller accounts and their respective clients in WHM-root recently (needs must) however the reduction in diskspace usage was not comparative to the amount of space deleted.

Is there a way to find out what is using up the space, is there a way to check it? I used the du -sh command on /home/* however the total of all the accounts listed does not come near to the amount of diskspace used on the status2k script page?

View 2 Replies View Related

Deleting A Blog Without A Court Order

Oct 25, 2007

As a blog host will you delete a blog without a court decision?, or a rejoinder from the displeased party?

View 8 Replies View Related

Localdomains File Deleting Domain -->

Jun 14, 2007

I have a client that routes their mail through a spam service and then back to my server. in order for this to work, their domain needs to be listed in both the /etc/localdomains file and the /etc/remotedomains file

it seems now since the last WHM/Cpanel upgrade that every morning i have to go in and manually re-add their domain into the localdomains file in order for their email to work

is there someway i can make it so it doesn't get removed?

View 4 Replies View Related

Plesk Automation :: PPA Not Deleting Old Backups

Jul 27, 2013

I have all my client hosting accounts set up to do backups daily but only keep two backups.

There is a problem as PPA is not deleting old backups and simply creates more and more backups until the backup server eventually runs out of space.

View 8 Replies View Related

Plesk Tomcat Error When Deleting Domain

Nov 14, 2007

I am running Plesk 8.1 for Linux and am trying to delete a domain via the control panel. The following error occurs:

ERROR: PleskUtilException

tomcatmng is failed --remove-service --vhost-name=domain.com

0: /usr/local/psa/admin/plib/utilmng.php:57

utilmng->call(string 'remove-service', array)

1: /usr/local/psa/admin/plib/tomcatmng.php:44

tomcatmng->remove_service(string 'domain.com')

2: /usr/local/psa/admin/plib/class.DSTomcat.php:226

DSTomcat->delete()

3: /usr/local/psa/admin/plib/class.PhDomain.php:315

PhDomain->reset(integer '0', boolean true, boolean false)

4: /usr/local/psa/admin/plib/class.BsDomain.php:297

BsDomain->reset(integer '0')

5: /usr/local/psa/admin/plib/class.BsDomain.php:291

BsDomain->delete(integer '0')

6: /usr/local/psa/admin/plib/class.BsDomain.php:530

mdeleteDomains(array)

7: /usr/local/psa/admin/plib/class.Manager.php:353

Manager->removeDomains(array)

8: /usr/local/psa/admin/htdocs/domains/domains.php3:209

Does anyone know how to fix this? Some Plesk users may have experienced this and I'm hoping could shed some light.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved