Sponsored Content
Top Forums Shell Programming and Scripting unix command/s to find files older than 2 hours in a directory Post 302146367 by neeljeet6 on Tuesday 20th of November 2007 07:20:52 AM
Old 11-20-2007
find $DM_CTL_DIR -type f -mmin +120

will delete all files older than 2 hrs..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding files older than 2 hours

I want to write a sh script that will find files older than 2 hours and tar them. I've had a look at the find man page but can't see how to do it by hours. Help please. Thanx (1 Reply)
Discussion started by: ianf
1 Replies

2. UNIX for Dummies Questions & Answers

Finding only those files older than 2 hours

I need to write a program that will only remove those files that are older than 2 hours. Is there some variation of find . -mtime ? -name '*' that I can use? Thanks as always for your help. Regards, Dave :) (2 Replies)
Discussion started by: mh53j_fe
2 Replies

3. Solaris

Deleting Files Older than 24 hours

Hi, I am using Solaris Box, I need to delete file(cookies.html) from the path(/usr/temp) which are older than 24 hours(I want in hours, not in days) Can u provide the command for the above query (7 Replies)
Discussion started by: mazhar803
7 Replies

4. AIX

how to find files older than 2 hours

I need help to find files in a directory that are older than 2 hours. Any help would be great. (3 Replies)
Discussion started by: pt14
3 Replies

5. Shell Programming and Scripting

Find files in a directory which are older than 2 hrs

hi all, I need to find files in a directory which are older than N hrs... n can be 1,2,3,.. etc when tried using -mtime option it gives all the files in the last 24hrs from the current time . please help me out on this .. thanks (8 Replies)
Discussion started by: sparks
8 Replies

6. Shell Programming and Scripting

Find files older than 8 hours

I need a script to find files older than 8 hours... I know i can use mmin but the same is not working...the same only support mtime... This is the script i created..but the same is only giving 1 hour old..as I have given dt_H as 1 only...but if i give 8..it can go in -(negative)..how to get the... (5 Replies)
Discussion started by: cotton
5 Replies

7. Shell Programming and Scripting

files older than few hours

Hi All I need to know the command which can be used to list the files which are 3 hours old so that it can be deleted. (3 Replies)
Discussion started by: mskalyani9
3 Replies

8. Shell Programming and Scripting

Deleting Files Older than 1 hours.

How to Deleting Files Older than 1 hours. Base on SunOS. this file gen every 1 min. -rw-r--r-- 1 nobody nobody 4960 Jan 27 02:02 23_201301270201.log -rw-r--r-- 1 nobody amudu 2325 Jan 27 02:03 33_201301270202.log -rw-r--r-- 1 nobody amudu 3255 Jan 27 02:03... (2 Replies)
Discussion started by: ooilinlove
2 Replies

9. UNIX for Dummies Questions & Answers

Find command to get the modified files past 2 hours

Hello, How to get the modified/created files past 2 hours in Solaris with find command? Thank you. (7 Replies)
Discussion started by: balareddy
7 Replies

10. Shell Programming and Scripting

Send email if latest file in a directory is older than 2 hours

I have a objective of Sending email if latest file in a directory(excluding files of sub-dirs) is older than 2 hours. eg : ls -ltr drwx--x--x 2 abcde abc 256 2017-02-07 20:10 Mail -rw-rw-r-- 1 abcde abc 1170 2017-02-24 17:30 test -rw-rw-r-- 1 abcde abc 356 2017-03-09 18:00 xyz.csv... (3 Replies)
Discussion started by: simpltyansh
3 Replies
PMDAMAILQ(1)						      General Commands Manual						      PMDAMAILQ(1)

NAME
pmdamailq - mail queue performance metrics domain agent (PMDA) SYNOPSIS
$PCP_PMDAS_DIR/mailq/pmdamailq [-b binlist] [-d domain] [-l logfile] [-r regex] [-U username] [queuedir] DESCRIPTION
pmdamailq is a Performance Metrics Domain Agent (PMDA) which extracts performance metrics describing the state of the e-mail queues managed by sendmail(1) and other mail transfer agents. The mailq PMDA exports metrics that measure the total number of entries in the mail queue, and the subtotals for entries that have been queued for various time periods. A brief description of the pmdamailq command line options follows: -b The binlist argument specifies a list of delay thresholds used to ``bin'' the entries in the queue into a a histogram based on how long the entry has been in the mail queue. The default thresholds are: 1 hour, 4 hours, 8 hours, 1 day, 3 days and 7 days. The entries in binlist are comma separated time intervals, using the syntax described in PCPIntro(1) for an update or reporting interval, e.g. the default list could be specified using the value 1hr,4hrs,8hrs,1day,3days,7days. Values in binlist are assumed to be in ascending order, and mail items in the queue less than the first threshold are binned into a special bin labeled ``recent''. -d It is absolutely crucial that the performance metrics domain number specified here is unique and consistent. That is, domain should be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts. -l Location of the log file. By default, a log file named mailq.log is written in the current directory of pmcd(1) when pmdamailq is started, i.e. $PCP_LOG_DIR/pmcd . If the log file cannot be created or is not writable, output is written to the standard error instead. -r Use an extended regular expression to match file names in the mail queue directory, rather than assuming all "df" prefixed files in the directory are mail files (the "df" prefix is the sendmail convention, but this convention is not followed by other mail daemons). The regex pattern specified should conform to the POSIX format described in regex(3), and it describes file names that should be con- sidered mail. -U User account under which to run the agent. The default is the unprivileged "pcp" account in current versions of PCP, but in older versions the superuser account ("root") was used by default. The optional queuedir argument defines the directory in which pmdamailq expects to find the mail queue. The default is /var/spool/mqueue. INSTALLATION
If you want access to the names, help text and values for the mailq performance metrics, do the following as root: # cd $PCP_PMDAS_DIR/mailq # ./Install If you want to undo the installation, do the following as root: # cd $PCP_PMDAS_DIR/mailq # ./Remove pmdamailq is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is installed or removed. FILES
$PCP_PMCDCONF_PATH command line options used to launch pmdamailq $PCP_PMDAS_DIR/mailq/help default help text file for the mailq metrics $PCP_PMDAS_DIR/mailq/Install installation script for the pmdamailq agent $PCP_PMDAS_DIR/mailq/Remove undo installation script for the pmdamailq agent $PCP_LOG_DIR/pmcd/mailq.log default log file for error messages and other information from pmdamailq PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
PCPIntro(1), pmcd(1), pcp.conf(5) and pcp.env(5). Performance Co-Pilot PCP PMDAMAILQ(1)
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy