[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: testing symbolic links



Angus D Madden <ii@h0001032302ae.ne.mediaone.net> writes:

> Does anyone know a of utility to check if a symbolic link is valid?
>
> I used a program called vpopbull (part of vpopmail package) to send a
> notice to a bunch of users.  To my surprise, vpopbull ignored the
> complete path I gave it and created links to a message that doesn't
> exist.  Now, when users try to open the message, it gives them an error.
>
> If there's a utitlity I can use with find to test the validity of links
> I could clear the problem up right away.

I'm new here so not sure if there is a deb package but there is a
program called symlinks.  It does exactly what you want to do.  You
just aim it at a directory and it recurses thru and gives various
reports depending on the flags you give it.  Probably easy to find out
if there is a debian package but I didn't know the technique yet.

That aside you can use the -type l flag to find for this too.

     find /path/to/tree -type l -exec ls -l {} \;
will give you a long ls on each of the links it finds.
(thats a lower case el (l) in there)



Reply to: