05-13-2005
The time of creation of file is not stored by Unix. Three timestamps are recorded:
last access time - last read ( yes even read will show up here)/write
last modification time - last time file was modified
last inode change time - last time the file inode was modified - changing owner, group, link count, mode.
Cheers!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
Is there a simple and obvious way to see when an account was created.An account has come to my attention in /etc/passwd and a last on it shows having never logged in and the home directory looks to be a couple of years old.
Just wondering if I'm over looking anything obvious.
... (2 Replies)
Discussion started by: Hayez
2 Replies
2. UNIX for Dummies Questions & Answers
Dear Expert,
Is there a command to do that in Unix?
In such a way that we don't need to actually "write" or
modified the content.
-- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all
Is ther anyway I can findout the date on which a file was created???
Regards
Sube (3 Replies)
Discussion started by: sube
3 Replies
4. AIX
Dear All,
I'd like to know is there any way to determine when a user id created in AIX?
Thanks,
Istvan (2 Replies)
Discussion started by: istvan.banai
2 Replies
5. Shell Programming and Scripting
Hi All,
I need to get file creation date.
I have to access one file who's name is like...
abc.log092308
and the date changes as per current date. And i am accessing this file next day. meance in above case i will access above file on 09-24-2008
Also one problem is that this file... (2 Replies)
Discussion started by: Jeevan Salunke
2 Replies
6. UNIX for Dummies Questions & Answers
I need to create a user with least permission on the production server.
He should only be able to read or execute the files that to be specific.
For example:
I just need to give him a set of commands to run.Besides those command execution He should be prevented to run any other command and He... (2 Replies)
Discussion started by: pinga123
2 Replies
7. Shell Programming and Scripting
what's the command to find the creation date of a certain dirctory? (1 Reply)
Discussion started by: miss_dodi
1 Replies
8. Shell Programming and Scripting
Hi All,
I would have many files in the server with
xyz*.dat -- Static file name
Physical files:
xyz1.dat - 01PM
xyz2.dat - 02PM
xyz3.dat - 03PM
In present version we are using
for f in $file_name
do
fname=`ls $f | grep -v ^'\|'$ | sed s/' '/'\\ '/g`
....
sqlldr... (4 Replies)
Discussion started by: Dharv
4 Replies
9. Shell Programming and Scripting
Hi,
I have a rdf zip file. This zip file consists of several *.rdf files.
I need to replace the date (this is different for each rdf) inside the node "Date_de_Publication_Periodique" of these rdf files.
e.g.,
awk '/Date_de_Publication_Periodique/ && /XMLSchema#date/' MM_NN-A1B1C1_ABC.rdf
... (11 Replies)
Discussion started by: Ribosome
11 Replies
10. Shell Programming and Scripting
Can someone draw up a script that for every file, folder and subfolder and files that will copy the creation date over top of the modified date??
I know how to touch every file recursively, but no idea how to read a files creation date then use that to touch the modification date of that file,... (3 Replies)
Discussion started by: toysareforboys
3 Replies
LEARN ABOUT ULTRIX
utimes
utimes(2) System Calls Manual utimes(2)
Name
utimes - set file times
Syntax
#include <sys/time.h>
int utimes(file, tvp)
char *file;
struct timeval *tvp;
Description
The call sets the access and modification times of the file named by file.
If tvp is NULL, the access and modification times of the file are set to the current time. A process must be the owner of the file, the
superuser, or have write permission to use in this manner.
If tvp is not NULL, it is assumed to point to an array of two timeval structures. The access time is set to the value of the first member,
and the modification time is set to the value of the second member. Only the owner of the file or the super-user may use in this manner.
In either case, the inode-changed time of the file is set to the current time.
Return Values
Upon successful completion, a value of zero (0) is returned. Otherwise, a value of -1 is returned, and errno is set to indicate the error.
Diagnostics
The system call fails if one or more of the following are true:
[EACCES] Search permission is denied for a component of the path prefix.
[EACCES] The tvp argument is NULL and the caller is not the owner of the file; write access is denied.
[EFAULT] The file or tvp points outside the process's allocated address space.
[EINVAL] An illegal timeval (that is, negative seconds or microseconds greater than 999999) was supplied.
[EIO] An I/O error occurred while reading or writing the affected inode.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[ENAMETOOLONG] A component of a pathname exceeds 255 characters, or an entire pathname exceeds 1023 characters.
[ENOENT] The named file does not exist.
[ENOTDIR] A component of the path prefix is not a directory.
[EPERM] The tvp argument is not NULL, the caller has write access, the caller is not the owner of the file, and the caller is
not the superuser.
[EROFS] The file system containing the file is mounted read-only.
[ETIMEDOUT] A connect request or remote file operation failed, because the connected party did not respond after a period of time
determined by the communications protocol.
See Also
stat(2)
utimes(2)