2007-11-01, 07:36 PM
Hi.
I need to pipe ls -l | awk' STUFF TO DETECT LINKED & SYMLINKED FILES ' > 1 { print }'
any help with the ' STUFF TO DETECT part is highly appreciated.
Thx. Kpratt out.
Awk pipe to detect linked files?
|
2007-11-01, 07:36 PM
Hi. I need to pipe ls -l | awk' STUFF TO DETECT LINKED & SYMLINKED FILES ' > 1 { print }' any help with the ' STUFF TO DETECT part is highly appreciated. Thx. Kpratt out.
2007-11-07, 01:17 AM
Quote:Hi.I need to pipe ls -l | awk' STUFF TO DETECT LINKED & SYMLINKED FILES ' > 1 { print }' Do you think you could be a little less vague ?
2007-11-19, 11:01 PM
I don't get your question, if you want to see all the link files, you can make something like example 1. find /bin -type l ./dnsdomainname ./ex ./red ./nisdomainname 2. ls -la `find /bin -type l` lrwxrwxrwx 1 root root 4 Jan 29 2007 /bin/awk -> gawk lrwxrwxrwx 1 root root 4 Jan 29 2007 /bin/csh -> tcsh lrwxrwxrwx 1 root root 8 Jan 29 2007 /bin/dnsdomainname -> hostname lrwxrwxrwx 1 root root 8 Jan 29 2007 /bin/domainname -> hostname 3. ls -la `find /bin -type l` | awk {' print $9 " " $10 " " $11'} /bin/awk -> gawk /bin/csh -> tcsh /bin/dnsdomainname -> hostname /bin/domainname -> hostname /bin/egrep -> grep and you can do more than this, just ask your question, so we or I can understand it.
2007-12-04, 01:37 PM
How about: Code: ls -l | awk -F"> " '/ -> /{ print $2 }' Not sure exactly what you are looking for but there you go. |
« Next Oldest | Next Newest »
|