• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Linux command to long list files

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand exactly what you're asking. But how about ls -lp?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the SE stands for Special Edition? I"m sorry that I'm dumb here.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Google to the rescue: selinux
 
reply
    Bookmark Topic Watch Topic
  • New Topic