Author
Linux command to long list files
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
Guys,
Is there a way where in I can long list the files in a directory along with the information that tells me from the resultant list that those individual files are a directory or a file or a symbolic link. Effectively I'm asking if there is a way to combile ls-l and ls-p with the result being shown in the ls -l way?
SCJP 1.4, SCWCD 1.4 - Hints for you , SCBCD Hints - Demnachst , SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12953
I don't understand exactly what you're asking. But how about ls -lp ?
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
Jesper Young wrote: I don't understand exactly what you're asking. But how about ls -lp ?
The first character in the ls -l result explains it... good learning, found it out by myself.
The d says that the file compile is a directory and exactly which is what I wanted to know when I give ls -l and this is what I get when I give ls -p
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
Jothi Shankar Kumar wrote:
Jesper Young wrote: I don't understand exactly what you're asking. But how about ls -lp ?
The first character in the ls -l result explains it... good learning, found it out by myself.
The d says that the file compile is a directory and exactly which is what I wanted to know when I give ls -l and this is what I get when I give ls -p
One of my favorites is "ls -lrthZ".
This does a detail list, using human-readable (MB, GB) filesizes in reverse size order, including SElinux attributes.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
I tried that on my Red Hat machine and gave me the error saying that "Sorry this option can be used only in a Linux SEKernel"
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
Jothi Shankar Kumar wrote: I tried that on my Red Hat machine and gave me the error saying that "Sorry this option can be used only in a Linux SEKernel"
Which is true. But if you don't care about SELinux, just leave off the "Z" option.
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
Does the SE stands for Special Edition? I"m sorry that I'm dumb here.
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5579
posted Jan 23, 2010 09:36:59
0
Google to the rescue: selinux
JBoss In Action
subject: Linux command to long list files