dir question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dir question

Greg Wallace-2
Could someone tell me what the date that comes out of this command is?  In
looking at the man pages, it goes to a lot of trouble explaining all of the
different options you can specify but nowhere does it simply say "With no
options, shows the following ...".  I also tried info.  My guess would be
that it is the last time the file was modified, but I want to be sure.

Thanks,
Greg Wallace


--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: dir question

Jorge Fábregas-2
On Friday 19 January 2007 7:54 pm, Greg Wallace wrote:
> Could someone tell me what the date that comes out of this command is?  In
> looking at the man pages, it goes to a lot of trouble explaining all of the
> different options you can specify but nowhere does it simply say "With no
> options, shows the following ...".  I also tried info.  My guess would be
> that it is the last time the file was modified, but I want to be sure.

Well, dir isn't a command at all. It's technically an alias.  Do this:

alias | grep dir

you'll see that it's an alias for "ls -l".  The time you'll see there is the
"modification time". It's the same when you do:

ls -l myFile.txt

If you don't specify any other argument it will show the last MODIFICATION
time (when contents of file changed).

If you do this:

ls -lc myFile.txt

it ill show the last "CHANGE" time. (this time is updated whenever the
metadata of a file is changed...like ownership, permissions etc)

And finally:

ls -lu myFile.txt

It show the last time the file was ACCESED.

HTH,
Jorge
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: dir question

Greg Wallace-2
On Friday, January 19, 2007 @ 6:49 PM, Jorge Fabregas wrote:

>On Friday 19 January 2007 7:54 pm, Greg Wallace wrote:
>> Could someone tell me what the date that comes out of this command is?
 In
>> looking at the man pages, it goes to a lot of trouble explaining all of
the
>> different options you can specify but nowhere does it simply say "With no
>> options, shows the following ...".  I also tried info.  My guess would be
>> that it is the last time the file was modified, but I want to be sure.

>Well, dir isn't a command at all. It's technically an alias.  Do this:

>alias | grep dir

>you'll see that it's an alias for "ls -l".  The time you'll see there is
the
>"modification time". It's the same when you do:

>ls -l myFile.txt

>If you don't specify any other argument it will show the last MODIFICATION
>time (when contents of file changed).

>If you do this:

>ls -lc myFile.txt

>it ill show the last "CHANGE" time. (this time is updated whenever the
>metadata of a file is changed...like ownership, permissions etc)

>And finally:

>ls -lu myFile.txt

>It show the last time the file was ACCESED.

>HTH,
>Jorge

Thanks.  There was a discussion about the different times that were stored
for a file some while back (and about how original creation date is not
stored) but I couldn't find my notes and I don't recall the discussion being
tied directly to the various ls options.  Good information.

Thanks,
Greg W


--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]