--- Bob Proulx <[EMAIL PROTECTED]> wrote: > Dave Witbrodt wrote: > > *** Please type your report below this line *** > > You are expected to remove that line and replace it > with your report. :-)
Then why does it say "below"? Should I file a bug report on 'reportbug'? ;) > > I have a (bad) habit of removing directories using > 'rm -rdf' instead > > Yes, that is a bad habit. Stop using the -d option. > Using it routinely is quite bad. [...] Well, sitting here just now I tried to think back to when the bad habit formed. At first I assumed it was laziness -- 'rm' is less typing than 'rmdir' -- but then I realized that was not the explanation: 'rm -rdf' is _more_ letters than 'rmdir'. It finally dawned on me that, years ago, before I began learning Linux, I used DJGPP on an old 386 machine to begin learning the GNU tools. At some point I discovered that you could use one program (rm) to delete both files and directories (if I also supplied -d), and I thought that was cool. But 'rm -d' alone would never work, so I started using 'rm -df'. And that wouldn't work if the dir wasn't empty... thus the 'rm -rdf' combo. Too, too funny, huh? > There is nothing wrong with 'rm -rf' or 'rm -Rf'. Yes, I see... but how to retrain the brain? Maybe shock therapy? :( > If the nvidia module was installed using a package > then it would be better to remove the nvidia module > package. The message from dpkg that it couldn't > remove /lib/modules is information. It is a head's > up that there might still need to be cleanup done. > But it is not usually an error in and of itself. > Often simply removing the other packages with files > there will allow the proper cleanup to occur. Unfortunately, I don't use APT to manage my NVidia driver. I use the NVidia installer, which leaves cruft like this hanging around when I uninstall my kernels. I've learned recently how to replace the ALSA package in the kernel source with a newer version before compiling the kernel. The experiments leading up to that, however, left me with extra useless kernels. I had been compiling NVidia kernel drivers for each one before I rebooted to test it, but I am not aware of options in the NVidia installer that allow me to remove a single kernel driver without removing _all_ of the kernel drivers and the GLX binary blob. Therefore, I have to remove them myself. > > AMD64X2-5600:/lib/modules# rm -vrdf > > 2.6.24.080306.amd64x2.vesa/ > > I wouldn't have a usage complaint with 'rm -vrf > 2.6.24.080306.amd64x2.vesa/'. Yes. Duly noted... shock therapy imminent. > Multiple slashes in the middle of a path is not > going to cause problems. Because of the old Apollo > Domain system and then OSF/1 the POSIX standard says > that exactly TWO slashes at the front are special. > On the old Apollo that indicated a networked path. > Recently Cygwin has started using this too. But > three or more at the front are okay and any number > of slashes as directory separators are okay. In other words, the "bug" I reported isn't even a bug. Sorry for the noise. > You will be happy to hear that there has been quite > a bit of development with rm's directory traversal > since 5.97 that you reported against. The current > rm doesn't print multiple slashes. When next > you upgrade to either the upcoming released version > of Debian or to the Unstable/Sid version you will > get the new behavior. > > $ mkdir -p one/two/three/four > $ rm -vrf one/ > removed directory: `one/two/three/four' > removed directory: `one/two/three' > removed directory: `one/two' > removed directory: `one' > > Look good? Yep. Funny thing is, I was just about to upgrade from Etch to Sid (as soon as I finish backing up some files), so all of this happened as a fluke right at the last minute. The problem I reported is not a "bug", it has already been "fixed" upstream, and I only became aware of it because I was using a keystroke sequence I shouldn't have been using anyway. The gods are malign.... > I tried to be gentle! :-) > > Oh, yes, stop using '-d' option to rm! :-) Thanks. You did good, and I have learned. --- Jim Meyering <[EMAIL PROTECTED]> wrote: > FYI, this is fixed in coreutils-6.10: > > $ mkdir -p a/b/c > $ rm --verbose -rf a/ > removed directory: `a/b/c' > removed directory: `a/b' > removed directory: `a' Thanks, Jim. You were even gentler! DW -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

