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)
I'm trying to figure out how to display a certain line in a text file. I keep getting references to Tail and Head, and I know how these work, but i'm lost on how to find say the third out of the five lines and display only that.
I thought maybe grep could help, but that doesn't seem likely.
... (3 Replies)
Hi All,
I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10
-rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message
But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP
Is there... (3 Replies)
Hi, I'm just wondering how you display a specific set of columns of a specified file in Unix. For example, if you had an AddressBook file that stores the Names, Phone numbers, and Addresses of people the user entered in the following format (the numbers are just to give an idea of what column... (1 Reply)
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)
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)
I need to get notification via email when the line containing a pattern is changed in a file. Not during the time any changes to file occurs. Ie if we reset a user password say example, demouser the hash in the line containing the word demouser in the file /etc/group changes. So when this change... (1 Reply)
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)
I have a file storing some text
and another file storing some numbers
I want to display characters other than the specified place of strings
one.txt
xyz abc 233 skfo 4r443
sfs abc abcd sd fsdf sdfd
abc 11 abc 33 abc dsaf
two.txt
Nt_djd_k='5-6,7-9'
Nt_hh_l='3-6,7-8'
a=`grep... (4 Replies)
Discussion started by: rahulsk
4 Replies
LEARN ABOUT REDHAT
stat
STAT(1) FSF STAT(1)NAME
stat - display file or filesystem status
SYNOPSIS
stat [OPTION] FILE...
DESCRIPTION
Display file or filesystem status.
-f, --filesystem
display filesystem status instead of file status
-c--format=FORMAT use the specified FORMAT instead of the default
-L, --dereference
follow links
-t, --terse
print the information in terse form
--help display this help and exit
--version
output version information and exit
The valid format sequences for files (without --filesystem):
%A - Access rights in human readable form %a - Access rights in octal %b - Number of blocks allocated %D - Device number in hex %d -
Device number in decimal %F - File type %f - raw mode in hex %G - Group name of owner %g - Group ID of owner %h - Number of hard
links %i - Inode number %N - Quoted File name with dereference if symbolic link %n - File name %o - IO block size %s - Total size,
in bytes %T - Minor device type in hex %t - Major device type in hex %U - User name of owner %u - User ID of owner %X - Time of last
access as seconds since Epoch %x - Time of last access %Y - Time of last modification as seconds since Epoch %y - Time of last modi-
fication %Z - Time of last change as seconds since Epoch %z - Time of last change
Valid format sequences for file systems:
%a - Free blocks available to non-superuser %b - Total data blocks in file system %c - Total file nodes in file system %d - Free
file nodes in file system %f - Free blocks in file system %i - File System id in hex %l - Maximum length of filenames %n - File name
%s - Optimal transfer block size %T - Type in human readable form %t - Type in hex
AUTHOR
Written by Michael Meskes.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for stat is maintained as a Texinfo manual. If the info and stat programs are properly installed at your site, the
command
info stat
should give you access to the complete manual.
stat (coreutils) 4.5.3 February 2003 STAT(1)