Thread: listing directories with rwx permission..

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    33

    listing directories with rwx permission..

    How would i use grep and ls togehter to list all directories with rwx permission?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Use the find command
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    33
    i have to use ls and grep together


    even if i wanted to use find i would not know how

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Code:
    ls -al | grep "^drwx"
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    Oct 2003
    Posts
    33
    cool thanks...i'll assume thats right since i cant check it until monday

  6. #6
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    Hammer is always right!! the way that works is the | is called a filter. grep takes what the ls command gives it and does the check on it(of course in regex)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Listing sub directories
    By 39ster in forum Windows Programming
    Replies: 4
    Last Post: 07-12-2007, 07:20 AM
  2. VC6 directories
    By Magos in forum Tech Board
    Replies: 0
    Last Post: 03-11-2005, 05:52 PM
  3. listing files in directories portably
    By ab384 in forum C Programming
    Replies: 2
    Last Post: 11-03-2004, 10:50 AM
  4. Listing file in directories
    By Longie in forum C Programming
    Replies: 6
    Last Post: 09-26-2002, 08:56 AM
  5. Working with directories...
    By C Seņor in forum C Programming
    Replies: 4
    Last Post: 04-20-2002, 11:45 AM