l comman


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers l comman
# 1  
Old 02-09-2004
l comman

hi all

when we use the "l" command we get the list of all files & directories available. Files aged less than 6 months, when listed do not display the year. Now my requirement is, i need the time stamp should contain the year for file spooled as of date. Can u suggest me the command.

replies appreciated.

raguram R

ex:
-rw-r--r-- 1 rram group 1130 Jan 3 2003 a.c
-rw-r--r-- 1 rram group 32 Feb 3 18:05 a.sh

observe the time stamp.
# 2  
Old 02-09-2004
Remember to always read the man pages first. Smilie
Code:
ls(C)
*****

ls, l, lc, lf, lr, lx -- list contents of directories

Description
===========
-l
Lists in long format, giving mode, number of links, owner, group,
size in bytes, the time that each file was last modified. The -1
option is assumed. For files less than six months old, minutes and
seconds are included in the modification time and the year is
excluded. For a consistent format, use -T.

-T
Similar to -l, except that the modification time is always displayed
in full, as in this example:

   Aug 31 09:37:00 2001

Unless one of the -c or -u options is specified, the modification
time refers only to changes made to the file's data, or the
creation of the file. It does not record the time that changes were
made to the information stored in the inode.

# 3  
Old 02-10-2004
I have tried with almost all the "l"commands but i do not know how to get the YYYY stamp in the time for recently created files.

raguram R
# 4  
Old 02-10-2004
What is the output when you type l -T at the prompt?
# 5  
Old 02-10-2004
I have never heard of a -T argument for ls (or its aliases). I can't get -T to work on hp-ux nor sunos. Linux uses -T to set tabstops and -T requires an argument.

What version of unix are you using?
# 6  
Old 02-10-2004
Interesting .. we use ksh on sco 5.0.5 and 5.0.6

I had been looking at the man page on 5.0.6, where this works:
Code:
> ls -l
total 42
drwxrwxrwx   2 xxx      group      19968 Feb  9 10:24 tmp

> ls -lT
total 42
drwxrwxrwx   2 xxx      group      19968 Feb  9 10:24:59 2004 tmp

On 5.0.5, I get the following and the man page on the 5.0.5 system shows no -T option:
Code:
> ls -lT
l: ERROR: Illegal option -- T
usage: ls -1ACFLRabcdfgilmnopqrstux -W[sv] [files]

Sorry for the confusion, raguramtgr! Smilie

Last edited by oombera; 02-10-2004 at 01:07 PM..
# 7  
Old 02-11-2004
hi

we use solaris 5.8 and sco 5.0.5

the following message is displayed in both, when i give ls -T


$ ls -T
ls: illegal option -- T
usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]

replies appreciated.

raguram R
 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Solaris

Unable to execute any comman on a file

Hello everyone, I'm having a problem with a file. I can run any command on it : cp, mv, chmod,ln,more... Thanks for your help (13 Replies)
Discussion started by: adilyos
13 Replies

2. Ubuntu

how to upload comman file

Hi, How to upload multiple file using jsp on eclipse,give me a simple example for that. Thanks SN (0 Replies)
Discussion started by: snallusami
0 Replies

3. UNIX for Dummies Questions & Answers

Comman/Tool to check memory leak in solaris box

Hello Guys, Please let me know about commands or tools that are available to check memory leak in solaris box. Thanks in Advance (1 Reply)
Discussion started by: rajeshlbryan
1 Replies
Login or Register to Ask a Question