![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| file attributes and exception | krem | UNIX Desktop for Dummies Questions & Answers | 1 | 09-03-2006 05:45 PM |
| Assigning file attributes to variables | olimiles | Shell Programming and Scripting | 5 | 08-18-2006 06:31 AM |
| file attributes | Hitori | Shell Programming and Scripting | 1 | 07-12-2006 12:12 PM |
| file attributes | hytechpro | Shell Programming and Scripting | 2 | 09-16-2005 06:32 AM |
| rcp and file attributes | jhansrod | Shell Programming and Scripting | 2 | 05-26-2005 08:28 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
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 |
||||
| Google The UNIX and Linux Forums |