Re: Delete a Symbolic Link?



On Sat, 11 Mar 2006 12:12:55 +0000 (UTC)
per@xxxxxxxxxxxx (Per Hedeland) wrote:

In article <20060310231848.54f6fe86.steveo@xxxxxxxxxx> Steve
O'Hara-Smith <steveo@xxxxxxxxxx> writes:

Don't do that! It hurts! Just rm ./name_of_link no -r.

Probably good advice, but as pointed out in another followup, it's not
the -r but the (not mentioned in the original post) trailing slash that
hurts:

It's the combination - removing either the -r or the trailing /
stops the damage, but IMHO removing the -r is better viz:

steve@df1$ mkdir foo
steve@df1$ ln -s foo bar
steve@df1$ rm bar/
rm: bar/: is a directory

Nice safe error message and no damage. Also makes more sense,
if you don't want a recursive remove don't ask for one :)

--
C:>WIN | Directable Mirror Arrays
The computer obeys and wins. | A better way to focus the sun
You lose and Bill collects. | licences available see
| http://www.sohara.org/
.



Relevant Pages

  • Re: Ravensthorpe Signalling Problems
    ... be to 'damage a point blade' as reported. ... but trailing, yes, I can't see how it gets damaged ... the wheels through without damaging the switches, ... If the points do have a lock (and the majority of current power-worked ...
    (uk.railway)
  • Re: Delete a Symbolic Link?
    ... per@xxxxxxxxxxxx (Per Hedeland) wrote: ... It's the combination - removing either the -r or the trailing / ... recursively removing a symlink makes no sense - but it does ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Delete a Symbolic Link?
    ... per@xxxxxxxxxxxx (Per Hedeland) wrote: ... It's the combination - removing either the -r or the trailing / ... recursively removing a symlink makes no sense - but it does ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Ravensthorpe Signalling Problems
    ... through a *trailing point* wrongly set, ... be to 'damage a point blade' as reported. ... but trailing, yes, I can't see how it gets damaged ...
    (uk.railway)
  • Re: show hidden value in variable.. with mysql
    ... Where is the regex for removing the line feeds/new/tab/form feeds? ... for leading ws, trailing ws, and 1 or more replace ...
    (comp.lang.perl.misc)