Ubuntu Servers :: Automatically Delete Files Older Than 6 Months In Folder

Mar 27, 2010

I have server running ubuntu. There is folder /var/netflow and I have there files, which creates every 5minutes new ones(monitoring traffic on network). And I need to delete files older than 6 months manually. Can you help?

View 2 Replies


ADVERTISEMENT

General :: Delete Files Older Than 1 Year?

Sep 24, 2010

Possible Duplicate:How do I delete files greater than a certain date on linux How to delete all files in current directory and it`s sub directories older than one year ?

View 2 Replies View Related

Programming :: Delete Files Older Than 7 Days?

Jan 3, 2011

I am new to unix, I am looking for a script to delete files older than 7 days but i also want to exclude certain directories (like arch,log .....) and also some files with extensions ike .ksh, .ch, ..............) in directories and sub directories

View 4 Replies View Related

General :: Delete Files When It's Older 30 Days?

Jan 6, 2011

I am trying to put together ksh shell and I am new with writing scripts.How do you write a command to delete any files if it's 30 days old and also it's not currently being locked?

View 10 Replies View Related

General :: Delete Old Files Older Than 7 Days?

Sep 18, 2009

find -type f /path/* -mtime +7 -exec rm {} ;Is this the best way to delete only files (not directories) within /path that are older than 7 days? or is there a better way?

View 3 Replies View Related

CentOS 5 :: Delete Files Older Than 7 Days?

Jan 26, 2010

I've been trying to delete all files older than 7 days in a directory temp1.I have try different ways but nothing happend:

find /temp1/* -mtime +7 -exec rm rf
find . -mtime +7 -exec rm rf
find /temp1/* -mtime +7 -print -exec rm{}

View 13 Replies View Related

Ubuntu :: Delete Files In Trash That Is Older Than 10 Days With A Terminal Command?

Sep 27, 2010

Can I delete files in trash that is older than 10 days with a terminal command?

View 3 Replies View Related

Ubuntu Servers :: Samba - Access Folder To Delete Or Restore From The Recycle Bin Folder

Apr 24, 2010

I'm using ubuntu server 9.10 for a home build NAS. Everything is working great just have one more thing to figure out. I have Samba set up to access my files and I set up a recycle feature so anything deleted will get moved to a Recycled folder. (I learned this the hard way after hitting delete key by accident while browsing the shares in windows. Lost 100 GB of data)

Now it is for the most part working but the permissions on folders isn't getting set right. If I delete a file in a share I can go to Recycle bin folder and delete the file for good. But if I delete a folder I can not access that folder to delete or restore from the Recycle bin folder. I have to chmod the folder before I can do anything with it. Anything I can change to get folders deleted via windows to have the right permissions when it is moved to the Recycle bin folder?

[Code]///

View 1 Replies View Related

CentOS 5 :: Settings To Delete TMP Folder Automatically At Shutdown?

Jan 27, 2010

It seems to me that the /tmp folder is currently crowded with old stuff. How can I tell CentOS to always automatically delete all /tmp folder content just before shutdown?

View 4 Replies View Related

Server :: Script To Delete Files Older Than X Days Fstab Has Noatime Enabled?

Jul 26, 2011

I have set up a simple find and delete script for files older than X days. The problem is that some of the files that are send in this share are transfered from an archive server and creation/modified date remains the same when copied and the age of them could be a year ago or older and they get deleted over night by the script.For performance reasons the raid is mounted with noatime in fstab.Do you see any solution to this problem except enabling atime?I'm thinking at some more advanced script that writes the list of added files once a day and marks them for deletion after some time.

View 2 Replies View Related

Ubuntu :: Automatically Run Fsck Every Few Months?

Sep 5, 2010

I just recently switched from Windows to Ubuntu 10.04, and I remember that Windows had a disk check. I have no problems with my computer, but is it a good idea to run fsck every few months? Does Ubuntu automatically do this for me? Or this unnecessary unless I have a serious problem?

View 2 Replies View Related

General :: Automatically Delete Log Files?

Apr 9, 2011

I have a script running as a cronjobIt outputs logs upon each run to /var/log/mylog.logIs there anyway I can delete this or compress it when it gets too large?A cheap and dirty way is to setup another cronjob to delete the log every X interval.... although I'm not sure if that's the proper way

View 3 Replies View Related

Ubuntu :: Does Apache2 Have A Way To Automatically Delete Temp Files

May 1, 2010

I have a PHP script running on my website that can generate temporary images, but if I clean them up right away, then the browser doesn't have time to render them.Is there some way to make Apache2 delete them after 5 minutes or so?

View 3 Replies View Related

Ubuntu :: Does Apache2 Have A Way To Automatically Delete Temp Files?

Aug 14, 2010

I have a PHP script running on my website that can generate temporary images, but if I clean them up right away, then the browser doesn't have time to render them. Is there some way to make Apache2 delete them after 5 minutes or so?

View 1 Replies View Related

Fedora :: Allow User To Save/edit/delete Documents In A Folder But Not Delete That Folder?

Sep 6, 2011

Recently I setup a system for a non-technical user. He is only using Firefox, Pidgin and OpenOffice for about 2 hours a day. I have created a folder "/home/jim/myFiles" where he can save his document files. But Jim has accidentally deleted his myFiles folder on 2 occasions. He had intended to delete a file in that folder. Is there a way to lock the folder so that the user and create/read/write documents in that folder but not delete the folder itself?

View 14 Replies View Related

Ubuntu Servers :: How PID Folder Deleted Automatically

May 25, 2010

I'm new to Ubuntu (at least on server distributions). I used debian versions for a long time and thought, to try ubuntu LTS 10.0.4, because of the long time support cycle. I had problems, to install this distribution on a x86 platform (used with ASUS P4B533-v), because of kernel panic after installation. So I used a trick to get it running. I installed Ubuntu LTS 8.04 and compiled a kernel 2.6.34 and made a distupgrade. All went o.k. and is now running as a productive system.

My question now belongs to the used pid folder /var/run. I'm using some self compiled programs and had to create a separatly folder (e.g. /var/run/stunnel). My problem is, after rebooting the system, the folder is deleted automatically! Never saw this issue on other distributions. Is there any reason why? Of course, I can write a section in my init script, searching for existing folder and if not, creating it ...

View 2 Replies View Related

Ubuntu :: Delete Files That Aren't On Another Folder

Feb 5, 2010

I've been organizing my pictures (i.e. deleting the bad ones). However, I've recently got hold of those same pictures on a higher resolution and I'd like to delete the same pictures of the higher resolutions.This means that I'll have two folders, High Res and Low Res. I'd go through all files in the High Res folder and I'll check if there's a file with the same name in the Low Res folder. If there is, the file in the High Res folder will be kept. Otherwise, I'll delete it.So I wanted some quick way to delete PIC1.JPG, PIC3.JPG and PIC4.JPG from the High Res folder.

View 9 Replies View Related

Ubuntu Servers :: Rotation Part Is Not Removing Files Older Than 90 Days?

Dec 3, 2010

Seem my rotation part is not removing files older than 90 days. Anybody know what is wrong?

Code:
#!/bin/sh
#navigate to the desired backup location
cd /public/backup/linux
#dump the MySQL entirely, output file is dated
mysqldump -u root -pmt1jxz68f2 --all-databases > "`date +%Y%m%d`.sql"
#backup the web folder

[Code]...

View 1 Replies View Related

Programming :: Shell Script To Automatically Delete Files With The Same Name As The Parent Directory?

Mar 18, 2010

I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is

Code:

/home/pkd/fol1/

The virus would have created an file with complete paths

Quote:

/home/pkd/fol1.exe

If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path

Quote:

/home/pkd/fol11/fol11.exe
/home/pkd/fol12/fol12.exe

View 1 Replies View Related

Ubuntu :: Create A Folder Where You Can Copy Files To But You Can't Delete Them After?

Nov 24, 2010

i'm confronting atm. I need to create a folder where ppl can copy files and i need to be sure that those files cannot be deleted after they are copied there. The folder will be accessed over network, and i need to be sure no one will delete somebody else's files.Also i need to tell you that i'm working with regular users, so creating a folder for each user and chown/chmod-ing it won't do the trick(allready tried and ended up with a whole lot of files in the parent directory).I also tried chattr +a but that doesn't allow them to write new files in the folder.

View 2 Replies View Related

Ubuntu Servers :: Folder Permissions Automatically Set When Creating File

Apr 27, 2010

I have a little problem: I have a share folder on Ubuntu server: - Dump That folder is share with SAMBA and everyone can put files on it
My problem is the following: When someone create a folder, the folder permissions are automatically set with:
(let's take my username: Yann)

Owner: Yann
Group: Yann

Clearly that's wrong.. I want the Group to be auto set has "users" so everyone can access the folders on that share. Anyone know how to change this ? chmod and chown is getting a bit boring

View 2 Replies View Related

Ubuntu Security :: Secure Delete/Shred Files And Folder?

Jun 27, 2010

I don't use the Trash bin because it does not really delete things,speaking from a security point Instead, I gotten used to 'shred' and 'secure-delete' .But to move around files, cut-n-paste is very handy.And I was wandering if items from the Clip get stored somewhere ?i realize that they get overwritten again and again in the clipboard but do they also get stored somewhere else?

View 9 Replies View Related

General :: Delete Files In Folder Before Todays Date?

Sep 14, 2009

I currently have a command to backup a directory it will zip the directoryand place it where i have told it too, Now what i am after is a command i can run before my code, that will delete and tar.gz files before todays dateso i my ideal world it would be something like this, delete <'date +%m_%d_%y'.tar so this will delete all the files in this folder before todays date,

View 1 Replies View Related

Software :: Way To Automatically Copy Files Off Of A Cd To A Specific Folder?

Jun 24, 2011

What would be the best way to automatically copy all of the data off of a library of cds to a specific folder on the computer? I was thinking of running a bash script but I've run into a few snags figuring out the correct way to do it. Mainly due to the fact that the cd drive is mounted in a different folder in /media each time I insert a new diskAlso, the mounting and unmounting process causes it's own problems, but I think that could be covered by a for loop that checks /mtab every few seconds or so.

View 2 Replies View Related

General :: Finding A Recursive Shell Or Perl Script To Delete Files With The Same Name As The Parent Folder?

Jun 29, 2010

is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.

View 2 Replies View Related

Ubuntu Servers :: Lost Months Of Data After Power Failure?

Nov 13, 2010

Running Ubuntu headless server 9.10 with a RAID 1 on ext3. After a power failure (UPS power button was hit accidentally), I logged into the system via ssh and found that I had lost all data since my last reboot, which was 4 months ago. It was as if I had a perfect snapshot of my machine from 4 months ago. Everything, database files, logs, all report as if the machine had been off for 4 months. Fortunately, I have quality backups of all my data so I am able to recover, but I have never had such a problem before and I cannot figure out what happened.

View 4 Replies View Related

Ubuntu :: Folder Wont Delete \ Whenever Try To Press Delete Noting Happens?

May 9, 2010

SO after using Testdisk to recover some images, the folders recup_dir.1 & 2 have saved in my FIle System area, when ever I try to press delete noting happens. I have also tried rm -f -rrm -f -fIt still dont delete, I have also deleted my user account and made a new one, but the files are still there.

View 4 Replies View Related

Ubuntu Servers :: Settings To Backup Files Automatically?

Aug 8, 2010

Does ubuntu server automatically backup files? How can i get to them?

View 1 Replies View Related

Ubuntu :: Multiple Version Of 10.10 - Delete Some Of The Older Versions?

Mar 17, 2011

When I turn on my computer, because of frequent updates it will display several versions of Ubuntu 10.10 that I can choose from. I wonder if it is possible to delete some of the older versions and how. I think having several versions of Ubuntu uses up a lot of space in the hard drive.

View 4 Replies View Related

General :: Script To Delete Logfiles Older Than 1 Day?

Jul 6, 2011

I use this below script to delete the logfiles older than 1 day .find /home/cie101/madhu1 -mtime +1 -exec rm {} ;and it doesnot work properly.

View 12 Replies View Related







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