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


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

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

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

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 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 :: Rsync --delete Doesn't Delete Superflous Files

Sep 25, 2010

I am trying to use an old box as backup server. I have tried a couple of possibilities along the lines of:

Quote:

rsync -a --delete --progress --log-file=/home/$USER/info.txt -e ssh /home /etc root@192.168.0.106:/mnt/back

The problem is it does not delete files that has been removed from my local system?
I run the command as root on the local system.

(I realize I should properly not ssh into the server as the server's root but I'm having trouble with the permissions and I want to make sure everything else works before messing around with it)

View 2 Replies View Related

Ubuntu :: BASH Script To Move Files More Than 30 Days Old?

May 12, 2011

I need to move files to a backup drive if they are over 30 days old. All I could find, when looking for scripts, were ways to sort files by date and the solutions were all over the place and nothing seemed simple or good.

I've thought of building my own running "ls -al > filelist.txt" type of approach and then processing the file, but not sure that is best way. An array would be much easier and eliminate the file, but never done an array in bash.

View 9 Replies View Related

General :: Copy Files Less Than 7 Days Old?

May 6, 2011

I have searched for a way to copy file less than X days old and I found this:http://www.howtogeek.com/howto/ubunt...days-on-linux/ The syntax for deleting files less than 7 days old would be like this:find /path/to/files* -mtime -7 -exec rm {} ;I would like to copy the files to mntas, and I'm not sure what the syntax should be.ould this work?find /path/to/files* -mtime -7 -exec cp {} mnt
as ;

View 3 Replies View Related

General :: Finding Files Exactly 7 Days Old?

Apr 19, 2010

i am a newbie in linux ,i am writing a bash script to identify the files which are exactly 7 days ( a week old) i tried this command find /var/backup -mtime +7 -exec ls -d {} ;but this gives me even the files which are older than 7 days

[root@proxy access]# find . -mtime +7 -exec ls -d {} ;
./access.log.1.gz
./access.log.2.gz

[code]...

View 3 Replies View Related

OpenSUSE Network :: Move Files After N Days?

Sep 24, 2010

I have a script that moves files after 60 days from the FTP folder over to a trash folder which is not accessible by the FTP. From there I can delete the files whenever the drive get's full. That works fine so far.
The only thing that bothers me is that files moved to ".Trash" are not in any folder structure anymore (one big directory with the deleted files in it).

When I do a "ls -la" on the array {} I see the file names including the folders. I'm not sure if the find command or the mv command forgets about the directories.

This is the script: bash -c 'date;find /Volumes/data1/test/ -mtime +60 -type f -exec mv {} /Volumes/data1/.Trash/ ;;date' >> ~/mylog

View 2 Replies View Related

Ubuntu :: Can Delete These 'un-delete-able' Files In Trash?

Nov 1, 2010

I just can't stand knowing that there's a slight problem with my PC.I have roughly 12.5 Gigs of files, mostly movies that are multiple clones of a particular movie (which was an entirely different problem altogether) and I CANNOT DELETE THESE THINGS! There has to be a simple way to do it from terminal, problem is, I can't seem to find the trash directory in terminal.

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

Networking :: Rsync - Sync Files Modified Within The Last 60 Days?

Jun 3, 2009

Can anybody tell me how I can synchronise files between two computers in a network that have been modified or created within the last 60 days?

View 3 Replies View Related

General :: Command To Find All Of The Files Which Have Been Accessed Within The Last 30 Days?

May 14, 2010

Command to find all of the files which have been accessed within the last 30 days?

View 1 Replies View Related

General :: Script That Will Move All 30 Days Old Files In A Folder?

Jan 22, 2010

I`m totally new to linux, in fact I`m a windows adminscenario:I need to run a script that will automatically move 30 days old files from particular folder to a particular folder.

View 3 Replies View Related

General :: Archive All Files To One Single File In Every 30 Days?

Apr 12, 2010

I have a directory there are many files are writing to it , I would like to write a script to do that , can please provide the advise .

archive all files to one single file in every 30 days , and then remove these old files .

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

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

Ubuntu :: Recording Live Stream Into Separate Files?

Feb 21, 2011

I want to save streaming music into hard disk. I know mplayer/vlc can do that. But mplayer/vlc stores as a single large file. What i want is to save every songs separately. Is it possible?

View 4 Replies View Related

Ubuntu :: Permissions For My Home Directory Were Accidentally Changed From 'access Files' To 'create And Delete Files?

Nov 25, 2010

the permissions for my home directory were accidentally changed from 'access files' to 'create and delete files', and I changed them back, but ever since then I am not able to change any preferences/settings at all. power management, themes, panels, emerald, anything. my user account is supposed to be the administrator, and all the user privliges are checked. how to get control of my computer back?

View 9 Replies View Related

Red Hat / Fedora :: Captured Keyboard - Can Not Enter Anything ?

Jun 24, 2010

I'm using the Readhat Linux Enterprise 5, and I encountered a problem about captured keyboard need your help. I log in after entering the required username and password using keyboard, but then the keyboard is captured, i.e., I can not enter anything using keyboard. Meanwhile the mouse works well all the time. I encountered this problem when I pressed some keys wrongly two days ago, but unfortunatelly I can not find out these exact keys I pressed.

View 7 Replies View Related

OpenSUSE Install :: Sles11sp1 Dump Is Not Captured

Sep 6, 2010

I setup kdump on sles11sp1, on issuing "echo c > /proc/sysrq-trigger" capture kernel is not booted and kernel dump is not created. Here is my system configuration: Welcome to SUSE Linux Enterprise Server 11 SP1 (x86_64) - Kernel

(l). blade797:~ # uname -a Linux blade797 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux

blade797:~ # cat /proc/cmdline root=/dev/disk/by-id/cciss-3600508b1001030343220202020200018-part2 resume=/dev/disk/by-id/cciss-3600508b1001030343220202020200018-part1 splash=silent crashkernel=256M-:128M vga=0x317 steps followed to enable kdump:

1) yast2 kdump
2) chkconfig boot.kdump on
3) reboot
4) cat /sys/kernel/kexec_crash_loaded
1
5) echo c > /proc/sysrq-trigger
6) system panicked, but dump is not captured.
7) I'm missing /proc/vmcore on Sless11Sp1.

View 2 Replies View Related

Software :: How To View Captured Image From Webcam Using C?

Sep 22, 2010

I want develop an application using webcam.I want to capture the video from webcam and i want to dispay the video.can anybody suggest me how to do that thing using C lanuguage

View 6 Replies View Related

Software :: Use Tshark To Save Captured Data?

Jan 20, 2010

i want to use tshark to save captured data i want it to save it in a certain directory and every x seconds and 5 files so every x seconds Tshark saves another 5 files

View 2 Replies View Related







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