Unix Technical Forum

Partial Date displayed in the file listing using the ls command

This is a discussion on Partial Date displayed in the file listing using the ls command within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hi! Is it possible to diplay a complete date MM DD YYYY HH:MM format with ls command. A long ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-12-2008, 04:20 AM
Yajesh Shanker
 
Posts: n/a
Default Partial Date displayed in the file listing using the ls command

Hi!
Is it possible to diplay a complete date MM DD YYYY HH:MM format with ls
command.

A long time ago I remember reading in this group that if the file was
created within last 6-months, Unix will not dispayy YYYY. Is there anyway to
override this, such that the entire date is displayed.

e.g
r-xr-xr-x 1 bin 18308 Jan 22 2005 /usr/bin/klist
-r-xr-xr-x 1 bin 10088 Jan 22 2005 /usr/bin/kpasswd
-r-xr-xr-x 1 bin 14724 Jan 22 2005 /usr/bin/ktutil
-r-xr-xr-x 1 bin 87384 Sep 28 2006 /usr/bin/ftp
-r-sr-xr-x 1 bin 36808 Jan 8 13:20 /usr/bin/rcp <=====YYYY is missing
-r-xr-xr-x 1 bin 120844 Aug 25 2006 /usr/bin/telnet
-r-xr-xr-x 1 bin 53636 Jan 22 2005 /usr/bin/filesync
-r-xr-xr-x 1 bin 5808 Jan 22 2005 /usr/bin/rdate
-r-sr-xr-x 1 bin 63496 Jan 22 2005 /usr/bin/rdist

My intention is to import the listing collected into a database.

yajesh


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-12-2008, 04:20 AM
Huge
 
Posts: n/a
Default Re: Partial Date displayed in the file listing using the ls command

On 2007-04-02, Yajesh Shanker <yaj@rogers.com> wrote:
> Hi!
> Is it possible to diplay a complete date MM DD YYYY HH:MM format with ls
> command.
>
> A long time ago I remember reading in this group that if the file was
> created within last 6-months, Unix will not dispayy YYYY. Is there anyway to
> override this, such that the entire date is displayed.
>
> e.g
> r-xr-xr-x 1 bin 18308 Jan 22 2005 /usr/bin/klist
> -r-xr-xr-x 1 bin 10088 Jan 22 2005 /usr/bin/kpasswd
> -r-xr-xr-x 1 bin 14724 Jan 22 2005 /usr/bin/ktutil
> -r-xr-xr-x 1 bin 87384 Sep 28 2006 /usr/bin/ftp
> -r-sr-xr-x 1 bin 36808 Jan 8 13:20 /usr/bin/rcp <=====YYYY is missing
> -r-xr-xr-x 1 bin 120844 Aug 25 2006 /usr/bin/telnet
> -r-xr-xr-x 1 bin 53636 Jan 22 2005 /usr/bin/filesync
> -r-xr-xr-x 1 bin 5808 Jan 22 2005 /usr/bin/rdate
> -r-sr-xr-x 1 bin 63496 Jan 22 2005 /usr/bin/rdist
>
> My intention is to import the listing collected into a database.


man ls

The -e and -E options do what you want.



--
Ignorance more frequently begets confidence than does knowledge: it is those
who know little, not those who know much, who so positively assert that this
or that problem will never be solved by science.
[email me at huge {at} huge (dot) org <dot> uk]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-12-2008, 04:20 AM
george2
 
Posts: n/a
Default Re: Partial Date displayed in the file listing using the ls command

there's no -e or -E in my 'ls' 9 ( solaris 8)

/usr/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ]


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-12-2008, 04:20 AM
Huge
 
Posts: n/a
Default Re: Partial Date displayed in the file listing using the ls command

On 2007-04-02, george2 <george@twig.tk> wrote:
> there's no -e or -E in my 'ls' 9 ( solaris 8)
>
> /usr/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ]


Sorry, can't help you then - I only have Solaris 10 boxes to hand.


--
Ignorance more frequently begets confidence than does knowledge: it is those
who know little, not those who know much, who so positively assert that this
or that problem will never be solved by science.
[email me at huge {at} huge (dot) org <dot> uk]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-12-2008, 04:20 AM
Yajesh Shanker
 
Posts: n/a
Default Re: Partial Date displayed in the file listing using the ls command


"Huge" <Huge@nowhere.much.invalid> wrote in message
news:eur1ga$5qt$2@apophis.demon.co.uk...
> On 2007-04-02, Yajesh Shanker <yaj@rogers.com> wrote:
>> Hi!
>> Is it possible to diplay a complete date MM DD YYYY HH:MM format with ls
>> command.
>>
>> A long time ago I remember reading in this group that if the file was
>> created within last 6-months, Unix will not dispayy YYYY. Is there anyway
>> to
>> override this, such that the entire date is displayed.
>>
>> e.g
>> r-xr-xr-x 1 bin 18308 Jan 22 2005 /usr/bin/klist
>> -r-xr-xr-x 1 bin 10088 Jan 22 2005 /usr/bin/kpasswd
>> -r-xr-xr-x 1 bin 14724 Jan 22 2005 /usr/bin/ktutil
>> -r-xr-xr-x 1 bin 87384 Sep 28 2006 /usr/bin/ftp
>> -r-sr-xr-x 1 bin 36808 Jan 8 13:20 /usr/bin/rcp <=====YYYY is
>> missing
>> -r-xr-xr-x 1 bin 120844 Aug 25 2006 /usr/bin/telnet
>> -r-xr-xr-x 1 bin 53636 Jan 22 2005 /usr/bin/filesync
>> -r-xr-xr-x 1 bin 5808 Jan 22 2005 /usr/bin/rdate
>> -r-sr-xr-x 1 bin 63496 Jan 22 2005 /usr/bin/rdist
>>
>> My intention is to import the listing collected into a database.

>
> man ls
>
> The -e and -E options do what you want.
>
>
>
> --
> Ignorance more frequently begets confidence than does knowledge: it is
> those
> who know little, not those who know much, who so positively assert that
> this
> or that problem will never be solved by science.
> [email me at huge {at} huge (dot) org <dot> uk]



Thanks!
Yes ls -leg works great. Luckily I am using Solaris 10 x86.
Appreciate your help.

yaj


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-12-2008, 04:20 AM
Darren Dunham
 
Posts: n/a
Default Re: Partial Date displayed in the file listing using the ls command

Yajesh Shanker <yaj@rogers.com> wrote:
> Is it possible to diplay a complete date MM DD YYYY HH:MM format with ls
> command.


> A long time ago I remember reading in this group that if the file was
> created within last 6-months, Unix will not dispayy YYYY. Is there anyway to
> override this, such that the entire date is displayed.


On many versions of 'ls', no.

> My intention is to import the listing collected into a database.


How are they getting into the database? Usually there are other tools
besides 'ls'.

Perl can give the full date information with a line or two. 'stat' can
be compiled or downloaded.

--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com