Sponsored Content
Top Forums Shell Programming and Scripting greping certain modified date Post 302165552 by ali560045 on Friday 8th of February 2008 06:54:08 AM
Old 02-08-2008
i really not an expert in unix shell.....

so basically can u tell me in r best possible way how to use find command here. help me in this

Last edited by ali560045; 02-11-2008 at 03:44 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I get the last modified date of a file?

I am trying to load a group of files and their last dates modified into a text file that will in turn be used with SQL*Loader to load these files into Oracle. I am using a *.ksh script. I am getting the name of the file in by using the following: for file_ext in 'cat loaddir.ext'; do find... (2 Replies)
Discussion started by: akpopa
2 Replies

2. Shell Programming and Scripting

Last Modified Date

Hello, I'm on a practical training and i have to change a shell script which print out a HTML-File with all Printers (and features example: IP, Mac etc.) they have in the factory. The Features of the Printers are on each separate file. i mean every printer have an own file with it features. ... (12 Replies)
Discussion started by: cengiz
12 Replies

3. Shell Programming and Scripting

greping date in a file

i have a script that checks inside the file and find the start date and end date with time........... #!/bin/ksh cd /ednadtu3/u01/pipe/logs TZ=`date +%Z`+24 ;b=`date +%Y-%m-%d` echo $b for i in DBMaint.log do echo "Start Time:" >> /ednadtu3/u01/pipe/naveed/Report.txt cat $i | grep... (3 Replies)
Discussion started by: ali560045
3 Replies

4. UNIX for Dummies Questions & Answers

Last Modified Date for subfolders

Sorry for the basic question, but I have a feeling that my developers are circumventing our change control process, and I want to be able to easily keep track of the last modified date of sub-folders of the production folder. Basically, we have this major folder PROD, and then each application... (1 Reply)
Discussion started by: saint01
1 Replies

5. Shell Programming and Scripting

search by modified date

Hello, How can i search for all the files in a particular directory which are not updated from past 5 days. Thanks, Sateesh (4 Replies)
Discussion started by: kotasateesh
4 Replies

6. Shell Programming and Scripting

How to get the files which has modified date as yesterday and before?

Hi All, Can you please help me to get only the files which has the modified date as yesterday and before? Thanks in advance! Regards, Velava.S (4 Replies)
Discussion started by: velava
4 Replies

7. Shell Programming and Scripting

current date modified file

Hi , In my directory , i have many days file but i want to see all those which are of todays date. i tried this but it gives all the files mtime -0 |ls -ltr I tried the below option as well. 19635 find -iname "*.LOG" -mtime 19636 ls -ltr *.LOG -mtime -1 19637 ls -ltr *.LOG... (7 Replies)
Discussion started by: guddu_12
7 Replies

8. Shell Programming and Scripting

Script to copy creation date over top of modified date?

Can someone draw up a script that for every file, folder and subfolder and files that will copy the creation date over top of the modified date?? I know how to touch every file recursively, but no idea how to read a files creation date then use that to touch the modification date of that file,... (3 Replies)
Discussion started by: toysareforboys
3 Replies

9. AIX

How do I display a file's last modified date?

I'm using a script that I need to get a file's "last modified date" in a format like 01:51:14 PM. We are running on AIX 6.1.0.0. I can't seem to find the right command parameters. Help! (4 Replies)
Discussion started by: mattadams1983
4 Replies

10. OS X (Apple)

Arrange file by modified date

Hi, Am performing a find based on filename and result can contain multiple files being found Let's say my find command is find /Archive -f -name 12345.pdf and result of find command is /Archive/Folder A/12345.pdf /Archive/Folder B/12345.pdf please note white space in folder names I... (2 Replies)
Discussion started by: gigagigosu
2 Replies
Template::Plugin::Date(3pm)				User Contributed Perl Documentation			       Template::Plugin::Date(3pm)

NAME
Template::Plugin::Date - Plugin to generate formatted date strings SYNOPSIS
[% USE date %] # use current time and default format [% date.format %] # specify time as seconds since epoch # or as a 'h:m:s d-m-y' or 'y-m-d h:m:s' string [% date.format(960973980) %] [% date.format('4:20:36 21/12/2000') %] [% date.format('2000/12/21 4:20:36') %] # specify format [% date.format(mytime, '%H:%M:%S') %] # specify locale [% date.format(date.now, '%a %d %b %y', 'en_GB') %] # named parameters [% date.format(mytime, format = '%H:%M:%S') %] [% date.format(locale = 'en_GB') %] [% date.format(time = date.now, format = '%H:%M:%S', locale = 'en_GB) %] # specify default format to plugin [% USE date(format = '%H:%M:%S', locale = 'de_DE') %] [% date.format %] ... DESCRIPTION
The "Date" plugin provides an easy way to generate formatted time and date strings by delegating to the "POSIX" "strftime()" routine. The plugin can be loaded via the familiar USE directive. [% USE date %] This creates a plugin object with the default name of '"date"'. An alternate name can be specified as such: [% USE myname = date %] The plugin provides the "format()" method which accepts a time value, a format string and a locale name. All of these parameters are optional with the current system time, default format ('"%H:%M:%S %d-%b-%Y"') and current locale being used respectively, if undefined. Default values for the time, format and/or locale may be specified as named parameters in the "USE" directive. [% USE date(format = '%a %d-%b-%Y', locale = 'fr_FR') %] When called without any parameters, the "format()" method returns a string representing the current system time, formatted by "strftime()" according to the default format and for the default locale (which may not be the current one, if locale is set in the "USE" directive). [% date.format %] The plugin allows a time/date to be specified as seconds since the epoch, as is returned by "time()". File last modified: [% date.format(filemod_time) %] The time/date can also be specified as a string of the form "h:m:s d/m/y" or "y/m/d h:m:s". Any of the characters : / - or space may be used to delimit fields. [% USE day = date(format => '%A', locale => 'en_GB') %] [% day.format('4:20:00 9-13-2000') %] Output: Tuesday A format string can also be passed to the "format()" method, and a locale specification may follow that. [% date.format(filemod, '%d-%b-%Y') %] [% date.format(filemod, '%d-%b-%Y', 'en_GB') %] A fourth parameter allows you to force output in GMT, in the case of seconds-since-the-epoch input: [% date.format(filemod, '%d-%b-%Y', 'en_GB', 1) %] Note that in this case, if the local time is not GMT, then also specifying '%Z' (time zone) in the format parameter will lead to an extremely misleading result. Any or all of these parameters may be named. Positional parameters should always be in the order "($time, $format, $locale)". [% date.format(format => '%H:%M:%S') %] [% date.format(time => filemod, format => '%H:%M:%S') %] [% date.format(mytime, format => '%H:%M:%S') %] [% date.format(mytime, format => '%H:%M:%S', locale => 'fr_FR') %] [% date.format(mytime, format => '%H:%M:%S', gmt => 1) %] ...etc... The "now()" method returns the current system time in seconds since the epoch. [% date.format(date.now, '%A') %] The "calc()" method can be used to create an interface to the "Date::Calc" module (if installed on your system). [% calc = date.calc %] [% calc.Monday_of_Week(22, 2001).join('/') %] The "manip()" method can be used to create an interface to the "Date::Manip" module (if installed on your system). [% manip = date.manip %] [% manip.UnixDate("Noon Yesterday","%Y %b %d %H:%M") %] AUTHORS
Thierry-Michel Barral wrote the original plugin. Andy Wardley provided some minor fixups/enhancements, a test script and documentation. Mark D. Mills cloned "Date::Manip" from the "Date::Calc" sub-plugin. COPYRIGHT
Copyright (C) 2000-2007 Thierry-Michel Barral, Andy Wardley. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Template::Plugin, POSIX perl v5.14.2 2012-01-13 Template::Plugin::Date(3pm)
All times are GMT -4. The time now is 05:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy