I am trying to write a shell script that will remove files in a directory based on the date. For instance, remove all files older than yesterday. Any ideas? (4 Replies)
Hi Friends,
Can anyone help me with this:
To get the count of files that are existing in a directory created on a perticular date like in the example (01/08) .(having same pattern for the filename)
ex:
FileName Creted Date
FILE001 01/08/2007
FILE005 ... (6 Replies)
hi all,
here is the description to my problem.
input parameters: $date1 & $date2
based on the range i need to select the archived files from the archived directory and moved them in to working directory.
can u please help me in writing the code to select the multiple files based on the... (3 Replies)
I have to write one script which will delete the files in the below passion.
If today is 17-Feb-2010 then the script delete only 17-JAN-2010 files from the directory.
Could you please help me, How will I delete the files when the year is leap year, if today is 30th Mar 2010 then how will... (1 Reply)
Hi
Howto view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)
$ ls -lrt
total 4477
-rwxrwxr-x 1 oracle dba 569745 Apr 4 19:45 4_person2profileCon.txt.gz.04.04.11*
-rwxrwxr-x 1 oracle dba 3783 Apr 4 19:45... (4 Replies)
I wan to view files in a directory of a specific date. For example a log directory has log files . I want to view the list of the files which were generated on 01-May-2011.
Is there any option/proces to perform it?? (1 Reply)
Hi,
I need a script that moves files based on date to a folder. The folder should be created based on file date. Example is :
Date file name
----- --------
Oct 08 07:39 10112012_073952.xls
Oct 09 07:39 10112012_073952.xls
Oct 10 07:39 ... (6 Replies)
I have file listed like below
-rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz
-rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz
-rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz
-rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz
-rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz
I... (5 Replies)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
Discussion started by: yuvaa27
1 Replies
LEARN ABOUT DEBIAN
genplotfiles
GENPLOTFILES(1) colplot GENPLOTFILES(1)NAME
genplotfiles - utility to help automate creation of collectl plot file from raw ones
SYNOPSIS
/opt/hp/colplot/genplotfiles.pl -outdir [-switches]
DESCRIPTIONS
This utility is not intended to meet all plot file creation needs, but quite frankly should meet most. Features not provided with this
utility are best realized by running collectl directly in playback mode (see collectl -p). It is therefore important to understand what
this utility will and will not do for you before building an automation strategy around it.
The algorithm used is fairly simple - genplotfiles examines each collectl raw file to see it it falls within the data ranges (if specified)
and contains a matching hostname (if specified). If a plot file already exists, the timestamps are compared and the raw file skipped if
its newer than the plotfile.
Any raw files that pass all these tests are then passed to collectl with their timestamp wildcarded. The result is all raw files for that
host/date will be processed. This means if you copy over collectl raw files multiple times over the course of the day using rsync, you can
immediately genererate up-to-date plots for them using genplotfiles. Furthermore, you won`t even need any date parameters if the older
plot files are alreay up to date.
For an example of what a cron job that aggregates multiple collectl logs onto a single system for plotting purposes, see crontab.sh in the
same directory as this script.
SWITCHES
All switches are optional with the exception of -outdir:
-colbin path-to-collectl
This points to collectl and is only necessary if /usr/sbin is not in your path or you`ve chosen to install collectl in a non-stan-
dard directory.
-debug number
Primarily for development, will provide intermediate processing information based on its value. See souce for details.
-force
Always generate plot files even in there is an existing one that is newer than the latest raw file. This will be necessary if you
want to rerun this script and just change the value of -subsys.
-help
Print a summary of available switches.
-host string
Only process files that contain this string in their hostname portion of the filename.
-indir directory
Directory where to look for collectl logs. The default is /var/log/collectl and is therefore only necessary if your logs are in a
non-standard location.
-outdir directory
Directory into which to write the plottable files. This field is required.
-fromdate date
Ignore files with a datestamp in their name less that this value. The default is 20050101 and so defaults to all files. The value
of `yesterday` is also recognized to simplify scripts that call this.
-thrudate date
Ignore files with a datestamp in their name with a datestamp greater than this value. The default is the current day and one can
also specify a value of `yesterday`.
-subsys string
Instead of using the default subsystems for which data was collected, generate output files based on this set. There are basically
two reasons for doing this. The first is that you may want to reduce the size of the plot files, though with compression there is
rarely much point in this. The second is if you`ve asked collectl to collect summary data but want to plot detail data.
See the colplot FAQ for more information.
AUTHOR
This program was written by Mark Seger (mjseger@gmail.com).
Copyright 2005 Hewlett-Packard Development Company, L.P.
SEE ALSO LOCAL OCTOBER 2005 GENPLOTFILES(1)