Sponsored Content
Top Forums Shell Programming and Scripting ls -e to find out File modification time in secs Post 302235654 by rahulkav on Friday 12th of September 2008 11:04:33 AM
Old 09-12-2008
Thanks a lot for ur help. stat function is working perfectly fine

use File::stat;
$sb = stat($filename);
printf "File is %s, size is %s, perm %04o, mtime %s\n",
$filename, $sb->size, $sb->mode & 07777,
scalar localtime $sb->mtime; use File::stat;
$sb = stat($filename);
printf "File is %s, size is %s, perm %04o, mtime %s\n",
$filename, $sb->size, $sb->mode & 07777,
scalar localtime $sb->mtime;

Have not tried the version from dennis. will try.

But can't be get those parameters from Unix shell.
I mean even if not in seconds just the ctime, mtime and atime

Regards,
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File modification time

Does anyone know how to display the time with seconds of when a file was last modified. I can get hour & minutes but would also like seconds. --Running AIX (1 Reply)
Discussion started by: edog
1 Replies

2. UNIX for Dummies Questions & Answers

how to find difference of 2 timestamps in secs?

I have a requirement to find the time difference in second between 2 given time stamps. An example scenario is shown below: 30 Oct 11:42:29:992 DEBUG org.apache.commons.digester.Digester - New match='form-validation/global/validator' (IID=, TID=) 30 Oct 11:42:29:993 DEBUG... (0 Replies)
Discussion started by: Alecs
0 Replies

3. Shell Programming and Scripting

File modification time comparison

Hi All, I have two files (given below) each exists under different paths. I want to compare the modification time stamp of file1.txt is lessthan the modification time of file2.txt. month1=`ls -l file1.txt | awk '{ print $6}'` date1=`ls -file1.txt | awk '{ print $7}'` time1=`ls... (1 Reply)
Discussion started by: Arunprasad
1 Replies

4. Shell Programming and Scripting

Find and symbolic link modification time

Hi, I have a directory made up of many symbolic links to folders multiple file systems. I want to return folders modified within the last 50 days, but find is using the link time rather than the target time. find . -type d -mtime -50 Is there a way to either: a) Make a symbolic link... (1 Reply)
Discussion started by: earls
1 Replies

5. UNIX for Dummies Questions & Answers

Need Modification Time of a file

Hi all, I need the modification time of a file on a particular day say 3 days before. I just don't want the last modification time. I need all the modification times on a particualar day. Is there anyway to do it? Kindly help. Could anyone tell me where the modification time is stored?... (1 Reply)
Discussion started by: vidhyab
1 Replies

6. Shell Programming and Scripting

How to list the files based on the modification time using the find command?

Hi All, I need to list the files based modification time of the files from a directory, I cannot use "ls -t" as there are lot of files, which "ls" command cannot handle. New files will land there daily. So iam looking for an alternative through "find"command. All suggestions are welcomed. ... (6 Replies)
Discussion started by: Kesavan
6 Replies

7. Shell Programming and Scripting

How to change modification time of file?

Explain it with proper e.g (4 Replies)
Discussion started by: sidpatil
4 Replies

8. Programming

File date/time modification and permissions

First, oh great Unix gurus, forgive if this is a stupid question. Unix/Linux is not my main thing but I have been programming in C/C++ for many years. I will do my best to be specific. I have a program in C/C++ that needs to modify the time of a given file. Currently I do this using utime()... (5 Replies)
Discussion started by: Pug
5 Replies

9. AIX

Getting files through find command and listing file modification time upto seconds

I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds. Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies

10. UNIX and Linux Applications

Sendmail delay: 3 mins 11 secs... Every time.

Hi all, I would like some help with a sendmail problem: We have a new system comprising of 4 T7-1 servers, each hosting 5 LDOMs, all domains running Solaris 11.3 All emails sent from every one of these domains (including the control domains) sit in the queue for 3 mins 11 secs (sometime 3m 12s,... (11 Replies)
Discussion started by: Mysturji
11 Replies
Libravatar::URL(3pm)					User Contributed Perl Documentation				      Libravatar::URL(3pm)

NAME
Libravatar::URL - Make URLs for Libravatars from an email address SYNOPSIS
use Libravatar::URL; my $url = libravatar_url( email => 'larry@example.org' ); DESCRIPTION
See <http://www.libravatar.org> for more information. Functions libravatar_url # By email my $url = libravatar_url( email => $email, %options ); # By OpenID my $url = libravatar_url( openid => $openid, %options ); Constructs a URL to fetch the Libravatar for the given $email address or $openid URL. %options are optional. "libravatar_url" will accept all the options of "gravatar_url" in Gravatar::URL except for "rating" and "border". The available options are... size Specifies the desired width and height of the avatar (they are square). Valid values are from 1 to 512 inclusive. Any size other than 80 may cause the original image to be downsampled using bicubic resampling before output. size => 40, # 40 x 40 image default The url to use if the user has no avatar. default => "http://www.example.org/nobody.jpg" Relative URLs will be relative to the base (ie. libravatar.org), not your web site. Libravatar defines special values that you may use as a default to produce dynamic default images. These are "identicon", "monsterid", "wavatar" and "retro". "404" will cause the URL to return an HTTP 404 "Not Found" error instead and "mm" will display the same "mystery man" image for everybody. See <http://www.libravatar.org/api> for more info. If omitted, Libravatar will serve up their default image, the orange butterfly. base This is the URL of the location of the Libravatar server you wish to grab avatars from. Defaults to <http://cdn.libravatar.org/avatar/> for HTTP and <https://seccdn.libravatar.org/avatar/> for HTTPS. short_keys If true, use short key names when constructing the URL. "s" instead of "size", "d" instead of "default" and so on. short_keys defaults to true. https If true, serve avatars over HTTPS instead of HTTP. You should select this option if your site is served over HTTPS to avoid browser warnings about the presence of insecure content. https defaults to false. LICENSE
Copyright 2011, Francois Marier <fmarier@gmail.com>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/artistic.html SEE ALSO
<http://www.libravatar.org> - The Libravatar web site <http://www.libravatar.org/api> - The Libravatar API documentation perl v5.14.2 2012-04-04 Libravatar::URL(3pm)
All times are GMT -4. The time now is 10:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy