Re: How to search for symlinks pointing to directories?

2015-04-18 Thread Eric Blake
On 04/18/2015 11:41 AM, Peng Yu wrote: > This can be used to check if a symbolic link is pointing a file, a > directory, etc. Is there a way to check if a symbolic link is broken > without enumerating all the possibilities? find -L -type l -- Eric Blake eblake redhat com+1-919-301-3266 Li

Re: How to search for symlinks pointing to directories?

2015-04-18 Thread Peng Yu
On Sat, Apr 18, 2015 at 11:13 AM, Eric Blake wrote: > On 04/18/2015 10:02 AM, Peng Yu wrote: >> Hi, >> >> I don't see there is a way to search for symlinks pointing to >> directories natively in find. >> >> This can be done by using -exec and test. But I want to avoid using >> -exec. Is there a wa

Re: How to search for symlinks pointing to directories?

2015-04-18 Thread Eric Blake
On 04/18/2015 10:02 AM, Peng Yu wrote: > Hi, > > I don't see there is a way to search for symlinks pointing to > directories natively in find. > > This can be done by using -exec and test. But I want to avoid using > -exec. Is there a way to such a search natively in find? Thanks. find -xtype d

How to search for symlinks pointing to directories?

2015-04-18 Thread Peng Yu
Hi, I don't see there is a way to search for symlinks pointing to directories natively in find. This can be done by using -exec and test. But I want to avoid using -exec. Is there a way to such a search natively in find? Thanks. -type c File is of type c: b