Well, I agree with the paranoid comment (at least partially - which is to say, yes, that's REALLY paranoid.)
However,, sometimes typing too much can cause the very error you're trying to avoid.
In any case, unless you did a 'chown -R' of the folder, you're not going to be able to delete subdirectories, probably.
IMHO the safest steps are:
sudo su -
cd to the directory above the one you want to remove.
pwd and read carefully where you are. Read it again.
ls -l and verify the directory name you want is there as expected. Check it again.
ls -l DIR and verify it has what you expect. Twice.
THEN and ONLY then: type 'rm -rf DIR' but do NOT hit enter - hit 'tab' after DIR to make sure it adds the / so you know for sure you typed it right.
Go back over the lines before the command you are about to execute and make sure it looks right. If it does:
NOW, you can hit enter.
Now, ok, lets say you want to be hyper-paranoid.
sudo su -
cd <directory holding DIR>
mv DIR badDIRbad.no.no
ls badDIRbad.no.no - look and see if its what you expect
then you can 'rm -rf badDIR<tab>' (that is, hit 'tab' key after 'badDIR') and make sure it adds '.no.no'
If you are not sure that DIR is safe to remove, reboot now and look for errors. If you know that DIR isn't used by system, then:
Now, you are reasonably certain that you've got the right directory, hit enter.
Ok, that's beyond paranoid.... Twilight zone now returning you to your normal PLUG list discussions!
-----Original Message-----
From: PLUG-discuss [
mailto:plug-discuss-bounces@lists.phxlinux.org] On Behalf Of Matthew Crews
Sent: Monday, August 20, 2018 1:29 PM
To: Brien Dieterle; Main PLUG discussion list
Subject: Re: rmdir
On 8/20/18 1:02 PM, Brien Dieterle wrote:
> That's still too dangerous. What I do is first chown the folder to
> nobody user. Then sudo to nobody.
> Then I type out the full path to the folder, and use the arrow keys to
> move to the beginning of the line. Then I finally type rm - rf and hit
> enter
>
A little bit paranoid, but still better than accidentally deleting root ;)
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss