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


 
Thread Tools Search this Thread
Operating Systems AIX Getting files through find command and listing file modification time upto seconds
# 1  
Old 11-16-2015
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.

Last edited by rbatte1; 11-16-2015 at 10:10 AM.. Reason: Added ICODE for in-sentence code, corrected spelling
# 2  
Old 11-17-2015
Code:
# istat opc_inst.log
Inode 8309 on device 10/7       File
Protection: rw-r--r--
Owner: 0(root)          Group: 0(system)
Link count:   1         Length 9741 bytes

Last updated:   Fri Oct 23 14:46:11 2015
Last modified:  Fri Oct 23 14:46:11 2015
Last accessed:  Sun Nov 15 20:56:36 2015

# 3  
Old 11-17-2015
yes istat list the time upto seconds but i want to combine both find + istat ..so the result of find command will pass to istat command and give the modification time .
I also want only last modification time not all the details.
# 4  
Old 11-17-2015
Quote:
Originally Posted by Nitesh sahu
yes istat list the time upto seconds but i want to combine both find + istat ..so the result of find command will pass to istat command and give the modification time .
You might want to take a look at the man page of find, especially the -exec clause. Reading out loud the man pages of known commands is a service we offer only to VIP members, you know.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 5  
Old 11-17-2015
p.s. - if this is something that GNU coreutils provides as an argument (i.e., is this something you already do using find on GNU Linux) - then I would suggest trying to load GNU coreutils on AIX.

p.p.s. If I recall correctly, this is a question like one we had we had not too long ago - but that was about df and du. You can find extra info on how to locate coreutils for AIX there.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Listing only the files under a directory from the result of find command

Hi, I have a main folder 'home'. Lets say there is a folder 'bin' under 'home'. I want to check the list of files under subdirectories present under the /bin directory created in the last 24 hours. I am using the following find command under home/bin directory: find . -mtime -1 -print ... (3 Replies)
Discussion started by: DJose
3 Replies

2. UNIX for Dummies Questions & Answers

Delay of upto 7 seconds after typing in putty

Hi Friends, I am facing a very strange issue . I type something on putty session of servers of my work(locating in North America) and it appears only after 7 seconds or so. I am located in India. It doesn't happen with my colleagues who are sitting next to me :(. I use the ssh protocol to connect... (4 Replies)
Discussion started by: kunwar
4 Replies

3. Shell Programming and Scripting

Ls ignoring files from their modification time

Hi everyone, I'd like to know if is there a way to list files but ignoring some according to their modification time (or creation, access time, etc.) with the command 'ls' alone. I know the option -I exist, but it seems to only looking in the file name.. Thank you in advance for the... (8 Replies)
Discussion started by: Keyhaku
8 Replies

4. 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

5. UNIX for Advanced & Expert Users

How to get access time of a file upto the precision of seconds?

Hi , How can I get the last access time of a file upto the precesion of seconds in Unix. I cannot use stat as this is not supported. (10 Replies)
Discussion started by: kanus
10 Replies

6. 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

7. UNIX for Dummies Questions & Answers

Long listing of files using find command on remote server via SSH

Hi , I am trying to find some files on a remote machine using the find command. >ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt /home/atukuri/abc.txt The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Discussion started by: atukuri
2 Replies

8. UNIX for Dummies Questions & Answers

find command -- listing files twice

I noticed the other day that after i used the find command to search for some files, the computer listed them twice -- first with just the names of the files (meaning ./(then the individual file names), then with the directory name, followed by the file names (./directory name/file name). I was... (2 Replies)
Discussion started by: Straitsfan
2 Replies

9. Shell Programming and Scripting

Archive Files over certain modification time

Environment is cygwin on Windows Server 2003 as I could not think how I would achieve this using Windows tools. What I want ot achieve is the following. I have a Directory D:\Data which contains further subfolders and files. I need to move "files" older than 6 months modification time to... (4 Replies)
Discussion started by: jelloir
4 Replies

10. Shell Programming and Scripting

ls -e to find out File modification time in secs

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)
Discussion started by: rahulkav
3 Replies
Login or Register to Ask a Question