bash - How can I use find to search for symbolic links? -
this have:
abc:~/findtests$ ls -l total 0 lrwxrwxrwx 1 abc abc 22 2010-11-30 14:32 link1 -> /home/abc/testpy1.py
i trying search link link1
in current directory.
i did :
abc:~/findtests$ find -l . -lname 'link1' abc:~/findtests$ find -p . -lname 'link1' abc:~/findtests$ find -l . -lname 'test*' abc:~/findtests$ find -p . -lname 'test*'
but not output. doing wrong ?
to start with, man page:
"using -l causes -lname , -ilname predicates return false."
the target of symbolic link doesn't match 'test*' because there full path. try '*/test*'.
Comments
Post a Comment