Need to view all the attributes for a file/node

I need to find out when a file has been created. 'ls -l' just lists the last date the file was modified, not the creation date. I have also noticed when viewing the attributes through NT, the last modified date is the same as the file creation date. I thought maybe this was a fault due to Samba.

Kind regards,

Darren Palmer

Assuming you have perl on your system you can use the "stat" command from within PERL, something like:

perl -e '($devno,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)=stat($ARGV[0]);print "$ARGV[0] $atime $ctime $mtime\n";' /some/file/name
  • dEvNuL

First, UNIX inodes do not store file creation
date/time information. Use the stat(1) command
to get inode information.

The "stat" command will display...

$ stat hello
  File: "hello"
  Size: 11751        Filetype: Regular File
  Mode: (0775/-rwxrwxr-x)         Uid: (  501/bbarrett)  Gid: (  501/bbarrett)
Device:  3,65  Inode: 800032    Links: 1    
Access: Sun Sep 16 11:31:06 2001(00016.11:37:42)
Modify: Sun Sep 16 11:30:51 2001(00016.11:37:57)
Change: Sun Sep 16 11:30:51 2001(00016.11:37:57)

...that's all you get on UNIX :frowning: