LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ls, grep (https://www.linuxquestions.org/questions/linux-newbie-8/ls-grep-376474/)

Serena 10-24-2005 03:15 PM

ls, grep
 
I wanted to `ls -l` but exclude everything that is a symbolic link. So I tried
ls -l | grep -E -v '-\>'
which doesn't work. Is there a way to get the regex to work, or did I just miss a ls option which will do the same thing?

nilleso 10-24-2005 03:26 PM

since a link has permissions that start with l, (eg lrwx-wxr-x)...
why not use
Code:

ls -l |egrep -v ^l
which would eliminate any line that begins with a "l"

cheers :)


All times are GMT -5. The time now is 10:01 PM.