05-21-2011
Thanks am i mplementing the same here i need to find out one more thing while moving i need to zip it and moved to destination path
And finally i need this as a cron job daily which has to run at 00:00
Advance thanks for your help.
---------- Post updated at 07:06 AM ---------- Previous update was at 06:51 AM ----------
The requires thing is older than two months files only i need to move not the latest ones
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
A script or command to list files older than 2 months in a specified directory and remove it. (3 Replies)
Discussion started by: pbekal
3 Replies
2. Solaris
HI
I HAVE LOG FILES IN THIS FORMAT
XXX.log.20080509215745
XXX.log.20080209205745
XXX.log.20080301785745
XXX.log.20080109155745
XXX.log.20080409115745
XXX.log.20080309105745
I NEED TO FIND THE FILES FROM 3 MONTHS OLD AND REMOVE
PLEASE HELP
THANKS, (13 Replies)
Discussion started by: cvdev
13 Replies
3. Shell Programming and Scripting
Guys,
My log files stored in the date format format below(log_20080714072942):
TIMESTAMP=`date +%Y%m%d%H%M%S`
LOG=/log/log_${TIMESTAMP}.log
I'm looking for a shell script which deletes all files which is older than 3 months from today.
Regards,
Bhagat (3 Replies)
Discussion started by: bhagat.singh-j
3 Replies
4. Shell Programming and Scripting
Hi,
I have a very urgent requirement here. I have to find all files in the specified directory but not in the sub directories(The directory name is stored in a variable) which are older than the current date as well as current time and rename it as filename_yyyymmddhhmmss.ext and move it into a... (7 Replies)
Discussion started by: ragavhere
7 Replies
5. Shell Programming and Scripting
Hello,
I want to gzip files in a folder in bulk i.e. all files older than 1 month should be in *.gz format. Could you please suggest how this can be achieved. Thanks.
Regards,
Alok (1 Reply)
Discussion started by: alok1301
1 Replies
6. Shell Programming and Scripting
Hi Gurus
the count of files in a particular Directory...
ls -lrth | grep -c ^-
can any one share the command to Count the files which is Older than 3 months
So please help me out in this
Thanks in Advance (2 Replies)
Discussion started by: SeenuGuddu
2 Replies
7. UNIX and Linux Applications
Can anyone explain why Firefox 10 keeps losing history older than 2 months? (1 Reply)
Discussion started by: cokedude
1 Replies
8. Red Hat
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
7 Replies
9. Shell Programming and Scripting
I have a qnap TS259 that is running ubuntu. Have successfully setup back scripts that are initiated by cron.
I would like to create a couple scrypts that would operate on the recycle bins for both drives. Just want to be able to run the script manually that would walk through both directories... (13 Replies)
Discussion started by: mackconsult
13 Replies
10. Shell Programming and Scripting
Hi,
I am writing the script for tomcat logs clean up ending with *.txt and *.log.
cleanup should be applied to logs older than 7 days logs same will be scheduled in cron.
after googling found below but it only help partially.
find . -type f -name '*.log' -exec truncate --size 0 "{}" \;
I... (6 Replies)
Discussion started by: Riverstone
6 Replies
LEARN ABOUT DEBIAN
bcron-update
bcron-update(8) System Manager's Manual bcron-update(8)
NAME
bcron-update - Update system crontabs.
SYNOPSIS
bcron-update path [ path ... ]
DESCRIPTION
bcron-update polls the named files or directories periodically to see if there are any new, changed, or removed files. When it detects
changes, it mirrors those changes into the crontab spool directory. bcron-update runs as root in order to be able to read system files
that would potentially be unreadable otherwise.
On Debian, if path is a directory, bcron-update skips files in this directory with names that do not solely consist of lower- and uppercase
letters ('a'-'z', 'A'-'Z'), digits ('0'-'9'), underscores ('_'), and hyphens ('-').
EXAMPLES
To mirror modern vixie-cron's behavior, use:
bcron-update /etc/crontab /etc/cron.d
ENVIRONMENT
BCRON_SPOOL
The spool directory for bcron. Defaults to /var/spool/cron.
BCRON_USER
After writing files and before moving them into their final location, bcron-update changes the ownership of the file to this user so
that bcron-sched can read them.
SEE ALSO
bcron-sched(8)
DIAGNOSTICS
bcron-update outputs three different kinds of messages about actions it is taking.
Rescanning /etc/cron.d
The named directory has been modified, and will be scanned to determine what files have been added or deleted.
-/etc/cron.d/oldfile
The named file no longer exists and will be removed from the spool.
+/etc/cron.d/newfile
The named file was either created or modified since the last scan, and will be copied into the spool.
AUTHOR
Bruce Guenter <bruceg@em.ca>
bcron-update(8)