![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Processing a log file based on date/time input and the date/time on the log file | primp | Shell Programming and Scripting | 4 | 03-16-2008 08:23 AM |
| Unix File creation time | tinivt | Shell Programming and Scripting | 2 | 01-23-2007 03:27 AM |
| Changing Creation Date to a Prespecified Date of a File In Unix | monkfan | UNIX for Dummies Questions & Answers | 4 | 11-28-2006 04:15 AM |
| file creation date & time | alisevA3 | UNIX for Dummies Questions & Answers | 3 | 07-08-2005 02:21 AM |
| file creation time | sskb | UNIX for Dummies Questions & Answers | 1 | 10-04-2001 09:03 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I need the unix command which returns only the file name and its creation date/time in unix. I tried ls -l <filename>. But that is giving other details also which I do not want. Could anyone help me out? Thanks. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
This might serve your purpose.
ls -lrt | tr -s " " | cut -d" " -f6-9 Rahul. |
|
#3
|
|||
|
|||
|
Quote:
and i believe no where in the i-node file creation date/time would be stored |
|
#4
|
|||
|
|||
|
Agree with you.
But creation time should be stored somewhere i beleive as the find command can get the files created on/before/after a particular date. Curious to know where this info might be available. Rahul. |
|
#5
|
|||
|
|||
|
Quote:
from the man pages of find with respect to time modification Code:
-atime n
True if the file was accessed n days ago.
Code:
-ctime n
True if the file's status was changed n days ago.
Code:
-mtime n
True if the file's data was modified n days ago.
|
|
#6
|
|||
|
|||
|
Quote:
This has helped. Thank you all for your support. Actually I wanted to access the modified date and time only. I would anyhow find out whether it is possible to know the creation date and time of a file in unix and let you all know. Thanks again. |
|
#7
|
|||
|
|||
|
Code:
-ctime n True if the file's status was changed n days ago. Sorry, I thought ctime was creation date. Just went by the name. |
|||
| Google The UNIX and Linux Forums |