This is a discussion on Creation date from Solaris file within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I have a little question, how can i see the creation ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I have a little question, how can i see the creation date from a file???? and/or how can i see a lot of information from a file [creation date, mod date, other info]??? Thanks. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBc8fiWvC4cA0xVH8RAoKhAKCw7Eiicq5UPPfM54eu/EdBBHaGGACgwuTB hrFv5hV6EuOMIFg8GZjqFng= =QEHT -----END PGP SIGNATURE----- |
| |||
| On Mon, 18 Oct 2004, macd55 wrote: > how can i see the creation date from a file???? Solaris (nor any other UNIX) doesn't store the creation time. > how can i see a lot of information from a file [creation date, mod date, > other info]??? man ls. -- Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming", published in August 2004. President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich |
| |||
| In article <cl0hb3$gcn$1@mail4.masbytes.es>, macd55 <macd55@jehudreams.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all, > > I have a little question, > > how can i see the creation date from a file???? > and/or > how can i see a lot of information from a file [creation date, mod date, > other info]??? Unix doesn't store the creation time. The only times it stores for a file are the last read, last modification, and last inode change. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** |
| |||
| Rich: what do type of admin think that i am??? man ls, please.... Rich Teer wrote: > On Mon, 18 Oct 2004, macd55 wrote: > >> how can i see the creation date from a file???? > > Solaris (nor any other UNIX) doesn't store the creation time. > >> how can i see a lot of information from a file [creation date, mod date, >> other info]??? > > man ls. > |
| |||
| On Thu, 21 Oct 2004, macd55 wrote: > Rich: > > what do type of admin think that i am??? A top posting one. :-( If the ls man page doesn't provide the info you need, then I'd say that you're the type of admin that doesn't ask specifc enough questions. From an admin point of view (and this IS an admin newsgroup), ls (and perhaps getfacl) is the command you need. If you meant from within a C program, you should have said so, and/or asked in a programming newsgroup. -- Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming", published in August 2004. President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich |
| |||
| In article <Pine.SOL.4.58.0410210939520.17681@zaphod.rite-group.com>, Rich Teer <rich.teer@rite-group.com> wrote: > On Thu, 21 Oct 2004, macd55 wrote: > > > Rich: > > > > what do type of admin think that i am??? > > A top posting one. :-( On Dagobah, top-posting preferred it is. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** |
| |||
| User-Agent: Unison/1.5.2 On 2004-10-19 01:27:49 +0100, Barry Margolin <barmar@alum.mit.edu> said: > > Unix doesn't store the creation time. The only times it stores for a > file are the last read, last modification, and last inode change. For most values of Unix, anyway :-P $ ls -ld src drwxr-xr-x 11 tonyw mygrp 374 16 Oct 16:01 src $ GetFileInfo src directory: "src" attributes: avbstclinmed created: 07/11/2004 17:48:55 modified: 10/16/2004 16:01:19 There's nothing to stop a filesystem storing these attributes - UFS happens not to. I suppose on UFS on Solaris 9 you could get clever with wrappers and/or interpose libaries to store the creation date in a hidden attribute. Basically (*very* basically): $ touch newfile; runat newfile "date > when_created" $ touch 1225171605 newfile $ ls -l total 0 -rw-r--r-- 1 tw25440 adm 0 Dec 25 2005 newfile $ runat newfile cat when_created Fri Oct 22 10:34:45 BST 2004 -- Tony |
| |||
| User-Agent: Unison/1.5.2 On 2004-10-21 16:56:56 +0100, macd55 <macd55@jehudreams.com> said: > Rich: > > what do type of admin think that i am??? One that doesn't know that Unix doesn't store the creation date of a file anywhere (on a UFS filesystem, at least)? -- Tony |
| |||
| Hello, macd55 wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all, > > I have a little question, > > how can i see the creation date from a file???? Use BSM logging and store this information in the logs. > and/or > how can i see a lot of information from a file [creation date, mod date, > other info]??? Don't have a Solaris box handy at the moment, but on Redhat Linux the stat command gives some handy output [njd@workstation njd]$ touch tmp [njd@workstation njd]$ stat tmp File: `tmp' Size: 0 Blocks: 0 IO Block: 4096 Regular File Device: 2102h/8450d Inode: 311049 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ njd) Gid: ( 500/ njd) Access: 2004-10-22 20:38:03.000000000 +1000 Modify: 2004-10-22 20:38:03.000000000 +1000 Change: 2004-10-22 20:38:03.000000000 +1000 You could get this information through a number of ls arguments, but stat seems the easiest. Regards, Nathan Dietsch |
| ||||
| On Thu, 21 Oct 2004, Barry Margolin wrote: > On Dagobah, top-posting preferred it is. LOL - a good way to start a Friday! -- Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming" President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich |