Programming :: Write Synatax To Delete Stuff Older Than 8 Days?

Mar 31, 2011

I got this part from my script working that it will delete a folder is from 8 days agoEightDaysAgo=`(date --date="8 days ago" +%d-%m-%Y)`rm -rf $EightDaysAgoTarHowever I need to remove files that are older than 8days for example if the script is'nt run for a day it will remove both the 9th and 8th day one not just the 8th day one. If I'm making any sense lol

View 3 Replies


ADVERTISEMENT

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

General :: Script To Compress A Directory And Then Delete Older Than 7 Days

Feb 3, 2010

I have been trying to write a script that will take a directory, for example /accounts compress it into a .tar file with the filename containing the date of compression, for example accounts030210.tar and then place that file into a directory called /archive

I also want the script to delete files in /archive that are older than 7 days.

View 3 Replies View Related

General :: Delete Backups Older Than 7 Days Through Shell Script?

Jul 15, 2011

I am having my own testing server in which mySQL database will be backed up daily. in the format mysql_backup_dd/mm/yy.tar.gz in my home folder I need to setup a cron job to delete the backups older than 7 days.how to do this.

View 3 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

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

Networking :: Set The TTL To 2 Days For All Stuff Cached By Dnsmasq?

Mar 20, 2011

I have 2 questions:

1. How can I set the TTL to 2 days for all stuff cached by dnsmasq?

2. When I go to [URL] from my browser and then execute [URL] the query time returned is > 0 ms. When i execute it again it is 0 as it should be. So is dnsmasq not caching the domains looked up by my browser or what? in /etc/resolv.conf I have only 127.0.0.1 and for the upstream servers I have a different file that is only used by dnsmasq.

View 1 Replies View Related

General :: Shell Script To Copy All Folders Older Than 7 Days?

Mar 16, 2011

I want to make the script to copy all folders which older than 7 days from Linux server to Windows server by Samba. And make it automatically by using cron

View 4 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

General :: Command To Copy Files Older Than <n> Days Keeping Dir Structure?

Jul 6, 2010

I'm trying to truncate a postfix Maildata directory for one of our users. I want to be able to move any files older than <n> days to a new location, but also copying the relevant directory structure. This should be doable in the one comman. I've used find to locate the files, and mv to move them, but I can't figure out how to build the directoryt structure on the fly in the new location.

This is what I have so far:

Code:
find /Maildata/editor -mtime +42 -type f -exec mv -v {} /EditorEmailOld/ ; > ~/editor.txt

View 4 Replies View Related

Slackware :: Delete Stuff In /tmp?

Dec 23, 2010

Slackware-specific i suppose as I sometimes run out of root space and want to delete stuff in /tmp.

Code:
#!/bin/bash
# ~/bin/cleantmp
# Script to delete contents of /tmp folder, giving the option to delete

[Code]....

View 14 Replies View Related

Debian Multimedia :: Can Firefox Delete History Which Is Old For Some Days

Oct 24, 2010

I want Firefox to delete history after several days. Can I configure it this way?"Remember my browser history for at least..." is not the option which does it, right?

View 11 Replies View Related

Ubuntu :: Delete Any Mpg Files That Are Captured From The Stream That Are More Than 7 Days Old?

Apr 23, 2011

I want to capture a mms stream daily. All works well with that, but I also want to delete any mpg files that are captured from the stream that are more than 7 days old. Will this command work?

Code:
#!/bin/bash
find /mnt/tera/all_video/thai3 -ctime +7 -name "*.mpg" -exec rm -f {} ; -ls > /var/log/thai3.log 2>&1

[code]....

View 2 Replies View Related

Ubuntu :: Delete Stuff Under Wine?

May 3, 2010

I decided to install a game under Wine. It didn't work so I uninstalled it. The game still shows up under the Wine section. I tried going to the uninstall in the game folder and it said "Failed to change to directory '/home/user/.wine/dosdevices/c:/Program Files/Ubisoft/Gearbox Software/BrothersInArmsEiB/System' (No such file or directory)". When I go to Wine -> Uninstall Wine Software it doesn't show up, but the folder is still under wine -> Programs.

I brought up the directory and the folder doesn't exist. How can I remove it from the programs list under wine?

View 6 Replies View Related

Fedora :: How To Delete Folders With Stuff In Commandline?

Dec 21, 2010

I want to delete a folder with stuff in it through command line. I tired rm and rmdir but it doesn't seem to be working.

View 3 Replies View Related

Ubuntu :: Permission - Ability To Delete Stuff

Mar 16, 2011

I logged in via ssh to a computer and I can delete stuff that I should not be able to delete. I figured if the owner is different and the group is not mine and iit is 744 I should not be able to delete it...so I tested with "file1"..and I dont see my mistake:

users are "itv-storage" and "admin" on pc.
HTML Code:
itv-storage@pc:/RAID5/storage/test$ ls -la
total 12
drwxrwxrwx 3 admin admin 4096 2011-03-16 19:28 .
drwxrwxrwx 9 admin admin 4096 2011-03-16 18:37 ..
-rwxr--r-- 1 admin admin 0 2011-03-16 19:28 file1
drwxrwxrwx 3 itv-storage itv-storage 4096 2011-03-16 18:46 folder1
itv-storage@pc:/RAID5/storage/test$ rm file1
rm: remove write-protected regular empty file `file1'? y
itv-storage@pc:/RAID5/storage/test$ ls -la
total 12
drwxrwxrwx 3 admin admin 4096 2011-03-16 19:32 .
drwxrwxrwx 9 admin admin 4096 2011-03-16 18:37 ..
drwxrwxrwx 3 itv-storage itv-storage 4096 2011-03-16 18:46 folder1
itv-storage@pc:/RAID5/storage/test$

View 5 Replies View Related

Ubuntu :: Delete Stuff That Save As To Not Fill Computer With Crap

Apr 27, 2010

i tried to install the kiba-dock. i wasnt successfully in any of my attempts. i would get through about half way then have to find somewhere else that had different commands and advice. how do i delete the stuff that did save as to not fill my computer with crap im not using?

View 2 Replies View Related

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

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

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

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 View Related

Programming :: How To Grep Process Running More Than 30 Days Only?

Aug 18, 2009

is there a way for me to grep the process that running more than 30 days only using linux command or script?

example:i do ps -ef to list out the process, then i want to filter only the process that always running more than 30 days..

View 8 Replies View Related

Programming :: Non-root User Determine Which Days The Computer Ran?

Mar 22, 2010

Is there any way a non-root user can programmatically determine which days the computer ran during, say, the last month?

The information is in /var/log/messages.* but those files are root:root 640.

Non of the world-readable /var/log files on the Slackware 13.0 development system can be used:boot Not present if boot logging not enabled (default). dmesg No timestamps. lastlog Not enough info. wtmp Rewritten on each boot so not enough info. EDIT: not correct: by default wtmp is rotated weekly and kept for one month as configured in /etc/logrotate.conf xdm.log Not present if xdm not used. Xorg.0.log Not present if X not run.

View 5 Replies View Related

General :: Cannot Write Or Delete From SD Card

May 20, 2011

Code:
mount
/dev/sdd1 on /media/E0FD-1813 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
cp 'Aankhon Aankhon Mein hum tum ho gaye deewane.mp3' /media/E0FD-1813/Music/sumeet/a
cp: cannot create regular file '/media/E0FD-1813/Music/sumeet/a/Aankhon Aankhon Mein hum tum ho gaye deewane.mp3': Read-only file system
The micro sd card mounts & works as fat32 in windows xp just fine.

View 14 Replies View Related

Programming :: Looping Throghu Input Files With Different Number Of Days?

Nov 3, 2010

I want to itemize addition for each type of transactions. The example below is for 3 days,10/13/2010, 10/14/2010, & 10/15/2010.

PROD =89.25+89.25+104.47= 282.97
TAX =9.37+9.37+10.37 = 29.71
ETAX = 1+1+1 = 3

[code]...

View 8 Replies View Related

Programming :: Javascript GUI Stuff On 123reg?

Jan 11, 2011

I went to [URL] the other day, and I'm really impressed with the way, when you click on domain, it adds it to the cart WITHOUT A REFRESH. But what I really want to know is - how does it do the slick little effect when you click "Add to basket", when it "appears" on the right hand side?

View 4 Replies View Related

Ubuntu Networking :: NFS And OSX - Unable To Write Or Delete Anything

Jan 10, 2011

share a mount"/RAID" on my server: 192.168.0.2 with everyone on my network.192.168.0.*
From what I have listed below I am able to mount the share but I can not write or delete anything. It is almost like it is ro only permissions.

From the Server:

Code:

sudo cat /etc/exports
[sudo] password for jesse:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).

[code]....

Eventually I need to share 192.168.0.2:/RAID on two OSX computers as well. I read some places where you need to add insecure to your /etc/exports on your server in order for the OSX client to access the the share.

View 1 Replies View Related







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