File date stamps

File date stamps

Post by Peter da Sil » Tue, 24 Apr 1990 07:10:18



Quote:> Well Ethan, "ls" checks the year field of the dates for the file:
> 2) if the file is from previous years, then only display the year,
>    since the time would be more or less useless.

Indeed. "Let's see, is /usr/local/bin/frob the one I compiled after
fixing /usr/local/src/fro*.c? Or have we been using the wrong one
for the last year or so?"

% ls -l /usr/local/bin/frob /usr/local/src/fro*.c
-rwxr-xr-x   2 uucp     root       12736 Sep 22  1988 /usr/local/bin/frob
-rw-r--r--   2 uucp     root        1981 Sep 22  1988 /usr/local/src/fro*.c

I swear at "ls" about once a week for hiding that sort of thing from me,
then use "list" or "le" (depending on the system I'm on).
--


\_.--._/
      v        Disclaimer: People have opinions, organisations have policy.

 
 
 

File date stamps

Post by Irwin M. Far » Mon, 23 Apr 1990 18:58:07


Excuse my ignorance, but is there any significance as to whether the date
stamp on a file reported by an "ls -l" is an the form month name/day/time
or month name/day/year?  For example:

% ls -l
total 7
drwx------  2 fargo         512 Apr 20 15:00 Mail
drwx------  4 fargo         512 Apr 22 05:04 News
-rw-r--r--  1 fargo           0 Apr 18 20:09 PROJ4.DAT
-rw-r--r--  1 fargo           0 Apr 18 20:09 PROJ4.MOD
-rw-r--r--  1 fargo        4118 Apr 18 20:03 proj4.txt
% ls -l /
total 795
drwxr-xr-x  3 bin          1536 Feb 25 00:17 bin
-rwxr-xr-x  1 root        35020 Nov 12  1987 boot
drwxr-xr-x  2 root         4608 Mar 29 18:22 dev
-rw-r--r--  1 root         3959 Nov 10 22:39 diskusage
drwxr-xr-x  4 root         1536 Apr 16 01:01 etc
-rwxr-xr-x  1 root       145161 Nov 12  1987 kadb
drwxr-xr-x  2 bin           512 Jun 16  1988 lib
drwxr-xr-x  2 root         8192 Jun  4  1988 lost+found
drwxr-xr-x  2 bin            24 Nov 10  1987 mnt
-rwxr-xr-x  1 root        35020 Nov 12  1987 pub.boot
drwxr-xr-x  2 bin           512 Nov 11 14:59 stand
lrwxrwxrwx  1 root            7 Jun  4  1988 sys -> usr/sys
drwxrwxr-x  2 root          512 Nov 12  1987 tftpboot
drwxrwxrwx  2 bin          1024 Apr 22 05:53 tmp
drwxr-sr-x 14 news         1024 Apr 20 11:39 usenet
drwxr-xr-x 28 root          512 Mar 26 00:02 usr
-rwxr-xr-x  1 root       545378 Jan 16 13:51 vmunix

What's the reason behind the format differences?

Thanks.

Thank you and happy hunting!            Actually: Ethan M. Young




 
 
 

File date stamps

Post by Gary Mathe » Tue, 24 Apr 1990 02:55:41



Quote:>Excuse my ignorance, but is there any significance as to whether the date
>stamp on a file reported by an "ls -l" is an the form month name/day/time
>or month name/day/year?  For example:

>% ls -l /
>total 795
>drwxr-xr-x  3 bin          1536 Feb 25 00:17 bin
>-rwxr-xr-x  1 root        35020 Nov 12  1987 boot
>What's the reason behind the format differences?

Well Ethan, "ls" checks the year field of the dates for the file:

1) if the file is from this year, then the file is current and it displays
   the time -- year not needed.

2) if the file is from previous years, then only display the year,
   since the time would be more or less useless.

That's all!

                                                        Gary Mathews

-------------------------------------------------------------------------------

Columbia University     | Death is life's way of telling you you've been fired.
------------------------+ CPU time flies when you have a lot of bugs

 
 
 

File date stamps

Post by Irwin M. Far » Tue, 24 Apr 1990 04:39:45




>>Excuse my ignorance, but is there any significance as to whether the date
>>stamp on a file reported by an "ls -l" is an the form month name/day/time
>>or month name/day/year?  For example:

>>% ls -l /
>>total 795
>>drwxr-xr-x  3 bin          1536 Feb 25 00:17 bin
>>-rwxr-xr-x  1 root        35020 Nov 12  1987 boot

>>What's the reason behind the format differences?

>Well Ethan, "ls" checks the year field of the dates for the file:

>1) if the file is from this year, then the file is current and it displays
>   the time -- year not needed.

>2) if the file is from previous years, then only display the year,
>   since the time would be more or less useless.

Actually, from the slew of messages I received on the subject (Thank you
all for the replies!), the mm/dd/yy format is used if the file is 6 months
old, not a year old.

One person also told me that the year will also be printed if the file is
24 hours (or more) into the future.

Again, thanks for all the replies!

Thank you and happy hunting!            Actually: Ethan M. Young



 
 
 

File date stamps

Post by David Ellio » Tue, 24 Apr 1990 23:24:01



Quote:>One person also told me that the year will also be printed if the file is
>24 hours (or more) into the future.

I lied.  Well, I didn't actually lie so much as tell the truth about
one system.

The metric is usually (4.xBSD, System V) 6 months in the past and 1 hour
into the future.  At least one system I know of uses 24 hours into
the future to deal with unsynchronized clocks, but with the advent of
timed and similar facilities it isn't as much of a problem as it once
was.

--
David Elliott

(408)944-4073
"Art isn't a secret anymore!" -- Conrad Schnitzler

 
 
 

File date stamps

Post by Melinda Sho » Tue, 24 Apr 1990 08:52:42



Quote:>> 2) if the file is from previous years, then only display the year,
>>    since the time would be more or less useless.
>Indeed.

Indeed not.  ls checks to see if the timestamp is > six months old.
--

mt Xinu                          ..!uunet!mtxinu.com!shore
 
 
 

File date stamps

Post by Randal Schwar » Wed, 25 Apr 1990 05:04:06



| >Excuse my ignorance, but is there any significance as to whether the date
| >stamp on a file reported by an "ls -l" is an the form month name/day/time
| >or month name/day/year?  For example:
| >
| >% ls -l /
| >total 795
| >drwxr-xr-x  3 bin          1536 Feb 25 00:17 bin
| >-rwxr-xr-x  1 root        35020 Nov 12  1987 boot
|
| >What's the reason behind the format differences?
|
| Well Ethan, "ls" checks the year field of the dates for the file:
|
| 1) if the file is from this year, then the file is current and it displays
|    the time -- year not needed.
|
| 2) if the file is from previous years, then only display the year,
|    since the time would be more or less useless.
|
| That's all!

Almost.  Last time I had access to source (it was a while ago), I seem
to remember that 'ls' compared the timestamp-to-be-printed with the
current time, and if the difference was negative (file is from the
future) or exceeded a certain threshold (6 months?), the year format
was used.

Somebody with source can confirm this.  It's funny that it isn't
documented.  Well, actually not... the manpages were originally
designed with source access in mind... not having source is durn
frustrating for a true Unix hacker.  (Long live FSF!)

Just another UNIX hacker,
--
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |

\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/

 
 
 

File date stamps

Post by Doug Gw » Wed, 25 Apr 1990 08:27:56



Quote:>What's the reason behind the format differences?

"ls" shows the time of day only for times within the previous 6 months.
Beyond that, it is assumed that you're more interested in the year.
 
 
 

File date stamps

Post by Curtis Genero » Wed, 25 Apr 1990 20:46:43



--Excuse my ignorance, but is there any significance as to whether the date
--stamp on a file reported by an "ls -l" is an the form month name/day/time
--or month name/day/year?  For example:
--
--% ls -l /
--total 795
--drwxr-xr-x  3 bin          1536 Feb 25 00:17 bin
---rwxr-xr-x  1 root        35020 Nov 12  1987 boot

--What's the reason behind the format differences?
-Well Ethan, "ls" checks the year field of the dates for the file:
-1) if the file is from this year, then the file is current and it displays
-   the time -- year not needed.
-2) if the file is from previous years, then only display the year,
-   since the time would be more or less useless.
-That's all!
-                                                       Gary Mathews

Not under 4.{2,3}bsd.  If the file is more than six months old, ls(1)
displays the year instead of the time-of-day.  This also applies if the
file is older than 1 hour from now (or should than be 'younger than 1 hour
from now'? :-)

--curtis
--
Curtis C. Generous
Defense Technical Information Center (DTIC)

UUCP: {uunet,vrdxhq}!dev!generous

 
 
 

File date stamps

Post by Bob Goudre » Thu, 26 Apr 1990 06:19:28




Silva) writes:
> >> 2) if the file is from previous years, then only display the year,
> >>    since the time would be more or less useless.
> >Indeed.

> Indeed not.  ls checks to see if the timestamp is > six months old.

Re-read Peter's article.  His "indeed" was a (skeptical) response to
the second assertion ("... the time would be more or less useless"),
not the first.  You quoted him out of context.

------------------------------------------------------------------------
Bob Goudreau                            +1 919 248 6231
Data General Corporation

Research Triangle Park, NC  27709       ...!mcnc!rti!xyzzy!goudreau
USA

 
 
 

File date stamps

Post by Superus » Wed, 25 Apr 1990 23:51:51


->>>Excuse my ignorance, but is there any significance as to whether the date
->>>stamp on a file reported by an "ls -l" is an the form month name/day/time
->>>or month name/day/year?  For example:
->>>
->>>% ls -l /
->>>total 795
->>>drwxr-xr-x  3 bin          1536 Feb 25 00:17 bin
->>>-rwxr-xr-x  1 root        35020 Nov 12  1987 boot
->>
->>>What's the reason behind the format differences?
->>

->One person also told me that the year will also be printed if the file is
->24 hours (or more) into the future.
->

On my system - SCO Unix 3.2.1 - the year format is given for a file with a
modification time ANYTIME in the future

rbduc

--
 ///   - - - - - - - - - - - - - - - - - - - - - - >
 0 0   Richard Ducoty                               ..uunet!grumbly!root

 `  

 
 
 

File date stamps

Post by Paul Hi » Thu, 26 Apr 1990 00:14:03



Quote:> I swear at "ls" about once a week for hiding that sort of thing from me,
> then use "list" or "le" (depending on the system I'm on).

I must agree that it would be nice to be able to force ls to always
reveal the the exact time.  However, there is a -t option on ls to sort the
files by modification time.  You can always use -t to find the older of
two files:

     Script started on Tue Apr 24 11:01:21 1990
     <21> mkdir bin src
     <22> touch 0922080088 src/fro*.c
     <23> touch 0922083088 bin/frob
     <24> ls -lt src/fro*.c bin/frob
     -rw-r--r--   1 paul     sysadm         0 Sep 22  1988 bin/frob
     -rw-r--r--   1 paul     sysadm         0 Sep 22  1988 src/fro*.c
     <25> touch 0922084588 src/fro*.c
     <26> ls -lt src/fro*.c bin/frob
     -rw-r--r--   1 paul     sysadm         0 Sep 22  1988 src/fro*.c
     -rw-r--r--   1 paul     sysadm         0 Sep 22  1988 bin/frob
     <27>
     script done on Tue Apr 24 11:05:59 1990

Paul Hite   PRC Realty Systems  McLean,Va   uunet!prcrs!paul    (703) 556-2243
                      DOS is a four letter word!

 
 
 

File date stamps

Post by Blair P. Hought » Thu, 26 Apr 1990 01:05:28




>>What's the reason behind the format differences?

>"ls" shows the time of day only for times within the previous 6 months.
>Beyond that, it is assumed that you're more interested in the year.

In some systems it's a matter only of preventing ambiguity, and the
format changes after 12 months.

                                --Blair
                                  "UNIX stands for 'never
                                   the same color.'"

 
 
 

File date stamps

Post by Daniel R. Le » Sat, 28 Apr 1990 07:22:30



[ >> 2) if the file is from previous years, then only display the year,
[ >>    since the time would be more or less useless.
[ >Indeed.
[
[ Indeed not.  ls checks to see if the timestamp is > six months old.

Or whether the timestamp is in the future.
--
Daniel R. Levy                        >>> God: just say "yes" <<<
AT&T Bell Laboratories        UNIX(R) mail:  att!ttbcad!levy, att!cbnewsc!levy
1000 East Warrenville Rd.     Any opinions expressed in the message above are
Naperville, Illinois  60566   mine, and not necessarily AT&T's.

 
 
 

1. file date stamp

i am trying to get the file modification TIME (hh:mm) for files which
were created more than 6 months ago.  however, when doing a "ls"
command, files which were created more than 6 months ago do not show
the TIME but rather the YEAR.  for example:

-rw-r--r--   1 fred     17727 Jan 19  2005 1.txt
-rw-r--r--   1 fred     45116 Jan 19  2005 2.txt
-rw-r--r--   1 fred     42858 Jan 20  2005 3.txt
-rw-r--r--   1 fred    115713 Jan 21  2005 4.txt
-rw-r--r--   1 fred    101056 Jan 22 15:22 5.txt
-rw-r--r--   1 fred     19529 Jan 24 17:29 6.txt
-rw-r--r--   1 fred     38632 Jan 24 23:01 7.txt
-rw-r--r--   1 fred     48671 Jan 25 20:39 8.txt
-rw-r--r--   1 fred     48593 Jan 26 19:59 9.txt

file "4.txt" has a file modification time of "Jan 21 2005".  instead of
"2005", i really want the hour and minute.  is there anyway to obtain
this?

2. Tru64 C2 not permiting login

3. dhcp info file date stamp.

4. Gnome reporting PII chip as Celeron?

5. Date stamping commands in the shell command history file

6. Joystick support

7. Changing File Modified Time/Date Stamp

8. How full is my ethernet transmit queue?

9. Keeping With Stamped Date On Downloaded Files

10. Date stamping commands in the history file in ksh

11. How do you reset file date time stamp

12. time and date stamp of a file