• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Linux command to long list files

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15495
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand exactly what you're asking. But how about ls -lp?
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the SE stands for Special Edition? I"m sorry that I'm dumb here.
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google to the rescue: selinux
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic