04-24-2010
File creation time in seconds
Hi All,
Cany any one help me in solving this..
Problem statement: I have a requirement to find the time from which there are no files created in a given directory. For this I am assuming that I need to get the file creation time in seconds, then the current time in seconds using `date +%s`. Then calculating the time by subtracting file creation time from date.
Please, help me in getting the file creation time in seconds..
Thanks in advance..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i have to delete some files that were created on a particular date. is there any way to do that without affecting the files that were modified on the same date? (1 Reply)
Discussion started by: sskb
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
Is anybody can help me to get the file creation date with seconds?
-rw-r--r-- 1 opsc system 422550845 Aug 22 15:41 StatData.20020821
Thanks in advance
Krishna (7 Replies)
Discussion started by: krishna
7 Replies
3. Programming
Hi Everybody,
Is their any functions to find out the file creation time in 'C' (2 Replies)
Discussion started by: mr_manii
2 Replies
4. Shell Programming and Scripting
Hello folks,
I have a file, but it change every seconds, i use stats command to check its creation time, but it shows access,modify and change time same. Is there any other way to see the file creation date/time?
Thanks (2 Replies)
Discussion started by: learnbash
2 Replies
5. UNIX for Advanced & Expert Users
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. Programming
Hi all,
I'm after some help with this small issue which i'm struggling to work out a fix for.
I have a file that contains records that all have a time stamp for each individual record, i need to search the file for a specific time stamp and then search back 10 seconds to see if the number... (2 Replies)
Discussion started by: sp3arsy
2 Replies
7. Red Hat
Hi Everybody,
I would like to know file creation date and time in linux. I went throgh google and forums got some information but from that i am not sure for my question. Please check the following information.
"ls -l" ==> but it is just gives the last modified time and date of the file.... (2 Replies)
Discussion started by: mastansaheb
2 Replies
8. Shell Programming and Scripting
Hi ,
In a folder I have multiple files. I want total time taken to write those files. Can you please suggest what will be the best way to go for it? (2 Replies)
Discussion started by: Anupam_Halder
2 Replies
9. AIX
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 for Beginners Questions & Answers
Hi Team,
Could you please let me know ,how to find the file creation date time in SFTP server.
i tred like , ls -ltr command only availble and not available like ls --full-time test.txt
please help?
Thanks (7 Replies)
Discussion started by: bmk123
7 Replies
time(1) General Commands Manual time(1)
Name
time - time a command
Syntax
time command
/bin/time command
Description
The command lets the specified command execute and then outputs the amount of elapsed real time, the time spent in the operating system,
and the time spent in execution of the command. Times are reported in seconds and are written to standard error.
If you are using any shell except the C shell, you can give the command as shown on the first line of the Syntax section. If you are using
the C shell, you must use the command's full pathname as shown on the second line of the Syntax section. If you do not use the full path-
name, will execute its own built-in command that supplies additional information and uses a different output format.
The command can be used to cause a command to be timed no matter how much CPU time it takes. For example:
% /bin/time cp /etc/rc /usr/bill/rc
0.1 real 0.0 user 0.0 sys
% /bin/time nroff sample1 > sample1.nroff
3.6 real 2.4 user 1.2 sys
This example indicates that the command used negligible amounts of user and system time and had an elapsed time of 1/10 second (0.1). The
command used 2.4 seconds of user time and 1.2 seconds of system time, and required 3.6 seconds of elapsed time.
Restrictions
Times are measured to an accuracy of 1/10 second. Thus, the sum of the user and system times can be larger than the elapsed time.
See Also
csh(1)
time(1)