Hello,
I have a simple while loopinside the script and I wish to tell unix to start reading from the oldest txt file. So, in case some new txt files are transferred into the same folder, the script will not take into consideration until all older files are completely processed. How may I do this?
Let's say, below process takes six hours to be completed and I do not wish to wait until then:
Should I list all txt files according to their age
And then sort from older to newer. Is there a nice way?
I'm writing a script to find the oldest file in a directory. I know this can be done by using ls -rt | tail -1 but these are rather large directories and that can be somewhat slow since the script will be running constantly.
Are there any other ways to do this that would be faster? I looked to... (2 Replies)
I would like to know where to find the start-up sequence for UNIX. I would like to find the command that starts the database up and do not know where to look and I'm sure there is a file that contains this info. Where is it???
Thanks in advance.
Dave. (3 Replies)
Hi all,
I need your assistance in removing the oldest file in a directory.
I posted the same thread 3 days back and I got the following answer
ls -1 -t | tail -1 | xargs rm
which is not covering the case when there are directories older than the oldest file.
So, could you please... (2 Replies)
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Hi:-
I need help with a script I need to modify: - what's the best/easiest way to find out the oldest file in a directory and then move this file to another directory?
Thanks, (5 Replies)
Hi all,
I am a newbie to scripting and I need your help regarding finding the oldest file in a particular directory. My intention is to remove that oldest file.
Are there any options available with the "find" command to do this..
Thanks in advance for your help
Pavan (4 Replies)
I am trying to determine the oldest and most recent files in a huge directory. I am using an ls -tr statement outside my find statement. The directory is too big and I am getting an "arg list too long" error. Is there something I can put in my find statement that doesn't create a list to... (2 Replies)
Hey! I have found similar posts both here and on other sites regarding this, but I cannot seem to get my script to work. I want to delete the oldest file in a test directory if there are more than two files. My script is currently:
#!/bin/bash
MEPATH=/usr/local/bin/test
FILECOUNT=`ls... (4 Replies)
Hi All,
I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder )
E.x : Folder : /data/opt/backup
01/01/2012 a.txt
01/02/2012 b.txt
... (1 Reply)
Discussion started by: akshay01987
1 Replies
LEARN ABOUT CENTOS
exiqsumm
EXIQSUMM(8) System Manager's Manual EXIQSUMM(8)NAME
exiqsumm - Summarising the queue
SYNOPSIS
exiqsumm [-a] [-c]
DESCRIPTION
The exiqsumm utility is a Perl script which reads the output of exim -bp and produces a summary of the messages on the queue. Thus, you
use it by running a command such as
exim -bp | exiqsumm
The output consists of one line for each domain that has messages waiting for it, as in the following example:
3 2322 74m 66m msn.com.example
This lists the number of messages for the domain, their total volume, and the length of time that the oldest and the newest messages have
been waiting. By default the output is sorted on the domain name, but exiqsumm has the options -a and -c, which cause the output to be
sorted by oldest message and by count of messages, respectively.
The output of exim -bp contains the original addresses in the message, so this also applies to the output from exiqsumm. No domains from
addresses generated by aliasing or forwarding are included (unless the "one_time" option of the redirect router has been used to convert
them into 'top level' addresses).
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO exim(8), /usr/share/doc/exim4-base/
AUTHOR
This manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system
(but may be used by others).
March 26, 2003 EXIQSUMM(8)