hello to everybody

the ls behaviour regarding date information is POSIXly correct. after 6 months the 
date is displayed in a different way.only linux user have an optional parameter to 
change the timeformat for all displayed items. 

the perl script - for purist 
" scalar localtime stat \"${1}\" [9] " would do the job as well - is great. teaching 
perl myself and this date problem is a known issue on unixes.

so this or similar scripts are used in other places as well.



apologies for any typos overlooked

kr mr
>>> [EMAIL PROTECTED] 01/26/03 00:02 AM >>>

Interesting utility, though you need to navigate to the CVS
browser to actually get the file.

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/els/els/

Jared


On Saturday 25 January 2003 07:23, Jesse, Rich wrote:
> Having the same problem of inconsistent output from "ls" (and other Unix
> commands!), I grabbed "els" from http://www.sourceforge.net.  I use "els -p
> +Gmsn +TMDY3", aliased of course, to produce consistent listings everytime.
> For an "ls -l" equivalent, I use "els -l +TMDY3".
>
> HTH!  GL!  :)
>
> Rich
>
>
> Rich Jesse                              System/Database Administrator
> [EMAIL PROTECTED]                     Quad/Tech International, Sussex, WI
> USA
>
> -----Original Message-----
> Sent: Friday, January 24, 2003 5:05 PM
> To: Multiple recipients of list ORACLE-L
>
>
> This will make Jared happy, I finally broke down and fumbled my way through
> some perl.
>
> function f_file_date {
>    {
>    print "#!/usr/bin/perl"
>    print "print scalar(localtime((stat(\"${1}\"))[9]))"
>    } > tmp.pl
>    perl tmp.pl
>    rm tmp.pl
> }
>
> This little diddy can be placed right in my .ksh script to get file
> modification times in a consistent format, I wanted to use "ls -l" but then
> it occurred to me that once the year changes the "ls -l" returns a
> different formatted date entry for files modified during the last year. 
> Maybe someone can suggest a prettier method of doing this within a .ksh
> script without calling another script.
>
> - Ethan
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Markus Reger
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to