Sponsored Content
Top Forums Shell Programming and Scripting extract last modified time of file in form of YYYYMMDD Post 302200106 by itsme_maverick on Wednesday 28th of May 2008 12:01:59 PM
Old 05-28-2008
Quote:
Originally Posted by Yogesh Sawant
try this:
Code:
stat -c '%y' filename | cut -d ' ' -f1 | sed -e 's/-//g'


Hi

I dont find "stat" in IBM AIX
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

extract a sub directory form a tar file

anyone know if it is possable to extract a subdirectory in a tar file. IE tarfile contains parent dir -sub dir A -sub dir B I want to extract sub dir B. (2 Replies)
Discussion started by: Optimus_P
2 Replies

2. UNIX for Dummies Questions & Answers

deleting files based on file name and modified time

Hi, I have some log files created in the following fashion Ex: file name modified date 1) s.log1 01-jan-08 2) s.log2 02-jan-08 3) s.log3 03-jan-08 4) s.log4 04-jan-08 Now I want to have the latest 2 logs and delete the others. Can you tell me the one liner /... (1 Reply)
Discussion started by: ammu
1 Replies

3. Shell Programming and Scripting

How to extract visually blank lines form the file

Hi, Could some one help me to get rid of visually blank lines from a file using shell or awk or sed (on Solaris machine)? When I use grep grep -v ^$ inputfile >outputfile it removes some blank lines.. but it seems some tab plus space balnk lines remains. thaen I used "grep -v '^]*$' ... (1 Reply)
Discussion started by: hadsuresh
1 Replies

4. Shell Programming and Scripting

Reg file modified time

Hi, I have modified one file today. So if i give `ls -lrt filename` command it will show the current modified time. But i wanted to know what is the previous modified time for this file Is there any way to find this Thanks, Puni (3 Replies)
Discussion started by: puni
3 Replies

5. Shell Programming and Scripting

Last modified time of the folder is changing when I view the file inside the directory

Hi., Last modified time of the folder is changing when I view the file inside the directory. Here is the test on sample directory. I believe that ls -l commands gives the time detail w.r.t last modified time. Pl. suggest. bash-3.2$ mkdir test bash-3.2$ cd test bash-3.2$ touch myfile.txt... (2 Replies)
Discussion started by: IND123
2 Replies

6. UNIX for Advanced & Expert Users

Finding the modified date time of a file

Hi, I am new bie to Unix. Might be a simple question I am asking. I want to find the last modified time of a file and find the difference between the currrent time and the last modified time. Appreciate, if someone can throw some light on what commands can be used. Cheers, James (2 Replies)
Discussion started by: JamesJoe
2 Replies

7. Shell Programming and Scripting

changing a file when the inode modified time of the other file changes

i have a requirement where i needed to change variable values in a properties file(first file) whenever there is change to Release details file(second file). My question is do i have to create a daemon process that always checks the modified time/inode change of the second file and then change the... (1 Reply)
Discussion started by: saikiran_1984
1 Replies

8. Shell Programming and Scripting

Filter date and time form a file using sed command

I want to filter out the date and time from this line in a file. How to do this using sed command. on Tue Apr 19 00:48:29 2011 (12 Replies)
Discussion started by: vineet.dhingra
12 Replies

9. Shell Programming and Scripting

Run a script when a file is modified/time stamp changed

Hi, I need to run a script file which uses a file and that file is modified as and when some alarms generated, it is not based on any fixed time period.. it may be modified even once in a minute for some time and once in 30 min or once in 20 min. Hence i need to watch for the timestamp change of... (3 Replies)
Discussion started by: aemunathan
3 Replies

10. Shell Programming and Scripting

how to change modified time of a file

A files last modified time is like 03/02/2012 xx:xx:xx So what would be the command to convert the last modified in the given signature Thanks for giving time and replying..:) (2 Replies)
Discussion started by: ezee
2 Replies
in(3pm) 						User Contributed Perl Documentation						   in(3pm)

NAME
Net::RIPWhois::in - Perl extension for accessing inetnum objects from RIPE whois database. SYNOPSIS
use Net::RIPEWhois::in $in = new Net::RIPEWhois::in; @in = getIn($whois, $prefix, $ALLOCOPT); $whois->closeWhois(); DESCRIPTION
Get inetnum objects from RIPE whois server. Validate as allocation object. METHODS
debug Get or set the debug. $in->debug(1); set the debug. $in->debug(undef); turn off the $debug; error ($errNo, $errMsg) = $in->error; $in->(undef, undef, true); reset the error message Will get the last error no and error string; if $whois->debug is set @{$in->{'errMsgAll'}} and @{$in->{'errNoAll'}} will have the list of all errors and error numbers. new $in = new Net::RIPEWhois::in Creates a new inetnum object. ENV variables WHOISHOST and WHOISPORT getIn Return a list of inetnum objects returned by whois. $whois = new Net::RIPEWhois; @in = $in->getIn($whois, $prefix, $ALLOCOPT); Selected attributes of inetnum are stored in data structure i<inetnum>. Should always query with fast raw output used by the RIPE whois db. $in->{inetnum}{attribute} return undef on error. use $in->error() to get error no. and message. splitWhoisAns Split the response string from whois ans and return list of inetnum on sucess. @inList = $in->splitWhoisAns( $whoisAnsRef); Returns undef on error. Spliting depending on fast raw output format from whois db. Use "-F" to get fast raw output. validAlloc Check the inetnum is an alloation or not. Using netname same as regid, translated "." to "-" . mnt-by RIPE-NCC-MNT ,RIPE-NCC-HM-MNT status ALLOCATED PA, ALLOCATED PI, ALLOCATED UNSPECIFIED and not in IANA Delegated list. As specified in the specification when queried "-L" "-T" in the range database should return max 3 inetnum objects. Assignment, Allocation & IANA delegation to RIPE. Skip if it is an IANA delegation and aply the previous check. @valid = $in->validAlloc(@inlist); undef on error. checkYYYYmmDD Function used to check dates are valid or not. Converts to UTC on YYYYMMDD and concert back to date format if these to matchs treated ad valid date. $YYYYMMDD = checkYYYYmmDD($YYYYMMDD); Accepts YYMMDD and YYYYMMDD formats. YYMMDD is treated as 19YYMMDD FILES
/ncc/ip-reg/delegations perl file with list of IANA delegations. REQUIRES
perl module ipv4pack AUTHOR
Antony <antony@ripe.net> software group RIPE NCC <softies@ripe.net> SEE ALSO
perl(1), Net::RIPEWhois(3), whois(1) perl v5.10.1 2003-07-28 in(3pm)
All times are GMT -4. The time now is 02:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy