Sponsored Content
Top Forums Shell Programming and Scripting How to extract latest file by looking at date time stamp from a directory? Post 302800605 by vidyadhar85 on Tuesday 30th of April 2013 05:46:55 AM
Old 04-30-2013
-mmin evalutes in minutes so you can use either -60 (1 hour) or -120 (2 hour) etc..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File date and time stamp

I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second. Any ideas... (1 Reply)
Discussion started by: Xenon
1 Replies

2. UNIX for Dummies Questions & Answers

Inserting Date&Time Stamp In Existing Log File

I am trying to insert a line with a date stamp in a file that is used to monitor activity in one of our directories. By doing this, I want to grep that file each day and go to the last entry for each time a error occurred and pull all errors generated if any exist. If error exists I want that error... (3 Replies)
Discussion started by: shephardfamily
3 Replies

3. Shell Programming and Scripting

Extract info from log file and compute using time date stamp

Looking for a shell script or a simple perl script . I am new to scripting and not very good at it . I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report. ... (0 Replies)
Discussion started by: breez_drew
0 Replies

4. UNIX for Dummies Questions & Answers

ls -ltr for a future date/time stamp file

Hi When i do ls -ltr <file1> then it shows me the date and time of the file if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date part ... even if time is ahead by 2 hr than current time. suppose a file was copied from INDIA... (3 Replies)
Discussion started by: reldb
3 Replies

5. Shell Programming and Scripting

Set date and time stamp of one file to another

Hi I use "touch -t xxxxxxxx" command to set date/time stamp of a file. My requirement is to read the date/time stamp of a file and apply it to another file. Is there anyway to do it simple instead of manually taking date/stamp of first file? TIA Prvn (2 Replies)
Discussion started by: prvnrk
2 Replies

6. Shell Programming and Scripting

If(Condition) Rename a file with (Date+Time) Stamp

Hi! Please see our current script: #!/usr/bin/ksh if (egrep "This string is found in the log" /a01/bpm.log) then mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log fi To the above existing script, we need to add the following change: 1) After finding the string,... (7 Replies)
Discussion started by: atechcorp
7 Replies

7. Shell Programming and Scripting

Read latest file name with a date and time and then download from FTP

Hi All, Please help. I have requirement to read the file / folder based on the latest date and download the file and folder. There will be files and folders in the location like 20140630-144422 20140630-144422.csv 20140707-182653 20140707-182653.csv 20140710-183153... (7 Replies)
Discussion started by: Praveen Pandit
7 Replies

8. Shell Programming and Scripting

Shell Script | Parse log file after a given date and time stamp

I am developing one script which will take log file name, output file name, date, hour and minute as an argument and based on these inputs, the script will scan and capture all the error(s) that have been triggered from a given time. Example: script should capture all the error after 13:50 on Jan... (2 Replies)
Discussion started by: ROMA3
2 Replies

9. Shell Programming and Scripting

Search Files on a given path based on latest time stamp

find /app/data -name "Availability" - Below is the output now i need to filter based on latest modified timestamp. I know 3 is the latest modified time stamp but i tried different options but only filtering docs and not on headnote..Can any one tell me how to do that.. ... (2 Replies)
Discussion started by: vkiyv05
2 Replies

10. Shell Programming and Scripting

Change date time stamp of existing file

I have a file hello.txt which was created today (today's date timestamp) I wish to change its date timestamp (access, modified, created) to 1 week old i.e one week from now. uname -a SunOS mymac 5.11 11.2 sun4v sparc sun4v Can you please suggest a easy way to do that ? (12 Replies)
Discussion started by: mohtashims
12 Replies
tart-custom(5)						     LinuxTaRT template format						    tart-custom(5)

NAME
tart-custom - Template format for LinuxTaRT DESCRIPTION
LinuxTaRT can use a user defined template file to generate the signature. The name and location of this file can be specified in ~/.tartrc, but defaults to the following location: ~/.tart-custom PARAMETERS
LinuxTaRT recognizes the following directives in the template and replaces them with the corresponding values: %c1 - CustomText1 from .tartrc %c2 - CustomText2 from .tartrc %tg - tagline Randomly selected from the tagline database. %hr - horizontal line %dt - todays date In the format: Monday, February 25, 2002 %12 - current hour 12-hour format %24 - current hour 24-hour format %mn - current minutes %ap - AM / PM %ut - system uptime For RiscOS or systems with the sysinfo function. %ib - time in ibeats %vi - LinuxTaRT version string %% - the percent symbol (%) Any other characters in the template are copied to the signature as is. EXAMPLES
The following template: LinuxTaRT - The Automatic Random Tagline %hr /dev/random says: %tg http://mycompany.com %hr Generates the following signature: LinuxTaRT - The Automatic Random Tagline ------------------------------------------------------- /dev/random says: Best way to dispose of the Borg: Give them Windows 3.1. http://mycompany.com ------------------------------------------------------- FILES
~/.custom SEE ALSO
tart(1) tartrc(5) tartdates(5) Mark Veinot 1.0.0 tart-custom(5)
All times are GMT -4. The time now is 07:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy