If you are looking for some kind of header that tells you what each section of the ls -lrt output is, then you are just going to have to keep a print out of it next to you. Its not hard to know what is what. You shouldn't need it if you know what is being output to the screen.
That is ok Nepomuk, ls -ltr | head -n 10 will 10 lines ...
I know, I do understand what head does, I just didn't quite understand, what it was you wanted.
Originally posted by AdusumalliGopik umar
but my concern is headings of the columns for 'ls -ltr' ..
like
permissions filename size .. etc
Ah, now I understand. Well, I checked the man page and couldn't find anything. There might be something in the coreutils info page (info coreutils -> * Directory listing:: -> * ls invocation::), but I couldn't find anything to solve your problem in there either so far. I guess, you're probably out of luck.
Of course, you could always try to write something like that yourself. (Maybe Perl or Python would be a good choice for this? But I know neither...)
That I know of, ls does not output the columns at all. 99.9% of the people using unix just know what each column is, so there is no need. If you need to know, then reference the ls man page. Otherwise, you can write a perl script to output headers and then the ls output.
Comment