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

Re: Really stupid use of cleanlinks

Also sprach Colin Watson (Wed 06 Aug 02003 at 07:21:57PM +0100):
> On Wed, Aug 06, 2003 at 12:48:11PM -0500, Michael D. Schleif wrote:
> > Actually, that script removes every symbolic link that does not test
> > successfully as a regular file.  Yes, that test will follow the symbolic
> > link; but, it will only check whether or not the destination is a
> > regular file.  It does *NOT* test for dangling symlink at all!  On my
> > system, I have *many* symlinks to directories, all of which contain
> > something, and this script flags *ALL* of them for removal . . .
> > 
> > What could be the purpose of this script?
> It's a utility to reverse the effects of lndir, which is mainly intended
> for building cheap copies of source trees. See their respective man
> pages.

Colin, I do not want to dis you, and I did not know that you _are_ David
Dawes ;>

However, on my systems, man cleanlinks produces this:

          cleanlinks - remove dangling symbolic links and empty directories


          The  cleanlinks  program searches the directory tree descended from the
          current directory for symbolic links whose targets do  not exist,  and
          removes  them.  It then removes all empty directories in that directory
          cleanlinks is useful for cleaning up a shadow link  tree  created with
          lndir(1) after files have been removed from the real directory.

Pardon my understanding; but, the name line and the first description
paragraph are quite clear.  Not to mention, that they are erroneous, and
dangerously misleading.

The _second_ description paragraph, especially that phrase ``is useful
for'', appears to me to be an afterthought -- not the actual program

What am I missing?

Best Regards,

mds resource
Dare to fix things before they break . . .
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .

Attachment: pgpdy3O_8MoHY.pgp
Description: PGP signature

Reply to: