Unix Technical Forum

Creation date from Solaris file

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


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 07:56 AM
macd55
 
Posts: n/a
Default Creation date from Solaris file

-----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-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 07:56 AM
Rich Teer
 
Posts: n/a
Default Re: Creation date from Solaris file

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 07:56 AM
Barry Margolin
 
Posts: n/a
Default Re: Creation date from Solaris file

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 ***
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 07:57 AM
macd55
 
Posts: n/a
Default Re: Creation date from Solaris file

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 07:57 AM
Rich Teer
 
Posts: n/a
Default Re: Creation date from Solaris file

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 07:57 AM
Barry Margolin
 
Posts: n/a
Default Re: Creation date from Solaris file

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 ***
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 07:57 AM
Tony Walton
 
Posts: n/a
Default Re: Creation date from Solaris file

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 07:57 AM
Tony Walton
 
Posts: n/a
Default Re: Creation date from Solaris file

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 07:57 AM
Nathan Dietsch
 
Posts: n/a
Default Re: Creation date from Solaris file

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 07:57 AM
Rich Teer
 
Posts: n/a
Default Re: Creation date from Solaris file

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:06 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com