How to find symlink?
Hya,
What is the easiest and fastest way to find symlink(s)? I know that Code:
find / -lname linktarget Is there any better way? Happy Penguins! |
If using ext3, enable its b-tree feature. It should speed up searching. Another way is contribute to slocate to include an option to search by file and directory types. The find utility is the normal search tool. slocate is a database search tool that needs to be updated when files or directories are created or moved.
|
ls -lR <dirname>|grep "^l"
I can't immediately figure out how to make this show the directory in which it finds each match. |
ls -lR <dirname> |grep "^l\|:$"
prints the directory name first and then symlinks in the directory |
Quote:
backreference!!--a little bell is ringing---is this a backreference? Note that this prints ALL the directories in the search path, plus the links it find in each one. I guess you could then write more code to strip out the one's which contain no links...... |
Quote:
Quote:
Code:
#!/bin/bash |
Hya,
Um... I guess life is not easy. Quote:
Happy Penguins! |
Quote:
Whew!!!---just one example of why shell scripting takes a few days to learn....;) |
Quote:
A) No. B) No. C) Yes, it used to be state-of-art, space occupying heavy industry product. Several KB (kilo bit??) range. D) Yes, it was Important Bunch of Machine for key-puncher. One card (boarding pass size) per one line. No backspace, delete keys. E) Yes. Some of these radios work without external battery. Coil, variable condenser, antenna, ear piece and crystal. (http://en.wikipedia.org/wiki/Crystal_radio) Happy Penguins! |
By the way,
Such a radio does not use any "semi-conductor" at all. Only conductor, inductor, capacitor and reactor. Not even resistor. Happy Penguins! |
Better?
Quote:
Doesn't the command: `find -xtype l -exec ls -l {} \;` work better than: `ls -lR $1 |grep "^l\|:$"` I think it processes much less junk! Cheers! OMR |
All times are GMT -5. The time now is 07:50 AM. |