Sponsored Content
Top Forums Shell Programming and Scripting Listing files older than 2 months Post 13308 by pbekal on Tuesday 15th of January 2002 02:24:16 PM
Old 01-15-2002
Listing files older than 2 months

A script or command to list files older than 2 months in a specified directory and remove it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find files older than 5 days and remove tem after listing

need help with this ... Find files older than 5 days and remove tem after listing list "test" file older than 5 days and then remove them (1 Reply)
Discussion started by: ypatel6871
1 Replies

2. Shell Programming and Scripting

Delete files older than 3 months.(read date from the name of the file)

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

3. Shell Programming and Scripting

Listing processes that are a day older

Hi All, I am trying to automate some stuff to make my 'to-do-things' easier. I am in need for help regarding this. I have an output root 17187 3465 0 23:00:00 ? 0:01 Process1 root 4975 4974 0 May 12 ? 0:00 Process2 root 4042 16713 0 Jan 30 pts/22 0:00... (4 Replies)
Discussion started by: reddybs
4 Replies

4. Shell Programming and Scripting

gzip files older than 1 months

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

5. Shell Programming and Scripting

need a code for moving the log files older than 2 months

Hi Viewer, I need logic code for moving the logs files from one directory to another directory. source :/xxxxxx/ xxxxxx / xxxxxx / xxxxxx / log --- under log directory we have so many files from last two years Here I need to check the files older than two months and I need to move in... (5 Replies)
Discussion started by: munna_su
5 Replies

6. Shell Programming and Scripting

Command to Count the files which is Older than 3 months?

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. HP-UX

listing processes older than n days

Hello; trying to find processes older than n days, mostly user shells Tried the following code on 11.31 box: in this case older than 5 days UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | awk '{print $2}' | xargs ps -ef|grep -v '?' |\ awk '$5 !~ ""' | awk '($5 ~ "$(date "+%b")")... (6 Replies)
Discussion started by: delphys
6 Replies

8. UNIX and Linux Applications

Firefox 10 keeps losing history older than 2 months

Can anyone explain why Firefox 10 keeps losing history older than 2 months? (1 Reply)
Discussion started by: cokedude
1 Replies

9. Shell Programming and Scripting

Deleting files and directory's older than 3 months

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

Listing files older than 30 days

Hi, Could someone help me that what the problem is in this code? #!/bin/sh FOLDER=/abc/datasource/checkstatus TIMESTAMP=$(date +%s) for filename in $(find $FOLDER -maxdepth 1 -type f -name "CHECK_STATUS*"); do f1=$($filename -Eo "{4}+") f2=$(date -d "$f1" +%s) if... (11 Replies)
Discussion started by: Home
11 Replies
uuclean(1M)															       uuclean(1M)

NAME
uuclean - uucp spool directory clean-up SYNOPSIS
[options] DESCRIPTION
The commands, including are targeted for removal from HP-UX; see the below. scans the spool directories for files with the specified prefix and deletes all those that are older than the specified number of hours. Options recognizes the following options: Clean directory instead of the spool directory. If directory is not a valid spool directory, it cannot contain ``work files''; i.e., files whose names start with These files have special meaning to pertaining to job statistics. Scan for files with pre as the file prefix. Up to 10 arguments can be specified. A without any pre following will cause all files older than the specified time to be deleted. Files whose age is more than time hours are deleted if the prefix test is satisfied (default time is 72 hours). The default action for is to remove files that are older than a specified time (see option). The option is used to find files older than time hours; however, the files are not deleted. If the argument file is present the warning is placed in file; oth- erwise, the warnings go to the standard output. Only files destined for system sys are examined. Up to 10 arguments can be specified. The option sends mail to the owner of the file when it is deleted. If a file is specified, an entry is placed in file. This program is typically started by (see cron(1M)). WARNINGS
Use of commands, including is discouraged because they are targeted for removal from HP-UX. Use ftp(1) or rcp(1) instead. FILES
spool directory SEE ALSO
uucp(1), uux(1), cron(1M), uucleanup(1M). Tim O'Reilly and Grace Todino, O'Reilly & Associates, Inc. USA. Grace Todino and Dale Dougherty, O'Reilly & Associates, Inc. USA. TO BE OBSOLETED uuclean(1M)
All times are GMT -4. The time now is 12:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy