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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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] |
| |||
| 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] |
| |||
| "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 |
| ||||
| 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. > |