Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copying files with the latest date Post 79801 by shashi_kiran_v on Monday 1st of August 2005 06:00:00 AM
Old 08-01-2005
Hi Vino,

Sorry I thought if people might have not seen in the dummies forum. So I posted here.

Thanks for the info..

Shash
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying files created after a specified date/time

I need to write a script that copies files from one directory to another that were created after "today 6:30". This script will be NOT be ran at the same time each day. any help is appreciated. (2 Replies)
Discussion started by: jm6601
2 Replies

2. Shell Programming and Scripting

Loop through files in dir, omit file with latest date

I want to loop through files in a directory but omit the file with the latest date in my list of files. How would I accomplish this? Thanks (2 Replies)
Discussion started by: stringzz
2 Replies

3. Shell Programming and Scripting

copying the latest file

Hi, I have a problem. I have some text files in a folder. The names can be like: emp_20080307053015.dat emp_20080306053015.dat emp_20080305053015.dat emp_20080304053015.dat The date format appended is like yyyymmdd and timestamp. What i need is i have to copy the latest file every... (12 Replies)
Discussion started by: Aswarth
12 Replies

4. Shell Programming and Scripting

shell script to find latest date and time of the files

Hi everyone, Please help:) I have a list of 1000 different files which comes daily to the directory.Some of the files are not coming to the directory now. I need to write a shell script to find the latest date and time of the files they came to the directory. The files should be unique.... (1 Reply)
Discussion started by: karthicss
1 Replies

5. Shell Programming and Scripting

Copying latest file into a folder

Hello all, this is my first post while i am trying to understand unix. I would basically like to know if i can do this: Lets say i have a folderA and folderB And i save something in folderA Can i make a script that checks folderA latest file, then compares it with the date of latest file in... (16 Replies)
Discussion started by: takissd
16 Replies

6. Shell Programming and Scripting

Copying a directory structure with the latest versions of files

Hello I have three directory structures for code releases. Each directory structure looks like this: bash-3.00$ ls -R | more .: Test_Release_1 Test_Release_2 Test_Release_3 ./Test_Release_1/dbcode: rp_online_import_srdp.pkb-1 srdp_ar_validation.pkb-1... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies

7. Shell Programming and Scripting

How to backup latest date files?

Hi, I have below two situations to handle, 1. I have list of files with file names having date&time. I have to backup to old date files. say I have below files in a directory, 1. XX123_20101004010101.dat 2. XX124_20101004010201.dat 3. XX121_20101003010101.dat 4.... (6 Replies)
Discussion started by: smr_rashmy
6 Replies

8. UNIX for Dummies Questions & Answers

latest files copying over to new path

ls -lrt | nawk -v D="$(date +'%b%e:'| sed 's/ //g')" 'D==$6$7":"{sub(".*"$9,$9);print}' This picks only the latest files created based on the timestamp for that particular day.. how do i copy over the same files to a different location???? (1 Reply)
Discussion started by: win4luv
1 Replies

9. UNIX for Dummies Questions & Answers

Selecting the file of latest Date

Hi Folks, I have one query that there is a folder in which daily several logs files are getting created , I reached to that location through putty but what I observer that 10 files of different date are been created with same name , what I need to see is the latest file ...let say the location is ... (5 Replies)
Discussion started by: KAREENA18
5 Replies

10. Shell Programming and Scripting

Perl : copying only the latest file to other directory

In linux.. In a directory there are 3 files which I want to copy only the latest file (ls -ltr myfiles*.txt|tail -1) to other directory in perl? Could anyone please help me with the code? Regards, J (1 Reply)
Discussion started by: scriptscript
1 Replies
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)
All times are GMT -4. The time now is 09:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy