How would i use grep and ls togehter to list all directories with rwx permission?
How would i use grep and ls togehter to list all directories with rwx permission?
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.
i have to use ls and grep together
even if i wanted to use find i would not know how
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]
cool thanks...i'll assume thats right since i cant check it until monday
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)