Jump to content

Can't delete folders using rm

Go to solution Solved by CyberneticTitan,

You have to specify a folder to remove. For example

 

rm -rf "Flipper@connerdev"

 

So an extension kinda broke my desktop, and im trying to delete it, I went into that folder, and typed rm -rf, but it doesn't do anything, anyone knows how to fix this?

20230903_000730.jpg.0cb2c28de3d92076ad8b62262f024a2a.jpg

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, CyberneticTitan said:

You have to specify a folder to remove. For example

 

rm -rf "Flipper@connerdev"

 

Oh I tried, but without the "", gonna try tomorrow again 

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, MiszS said:

Oh I tried, but without the "", gonna try tomorrow again 

Yeah you need to either quote it or escape the @, eg

rm -rf Flipper\@connerdev

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

If you wanna delete the folder you're currently in, do...

rm -rf $PWD

"$PWD" will automatically insert your current directory into the command. 

lumpy chunks

 

Expand to help Bunny reach world domination

(\__/)
(='.'=) This is Bunny. Copy Bunny into your signature to
(")_(") help him on his way to world domination.

 -Rakshit Jain

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Alex Atkin UK said:

Yeah you need to either quote it or escape the @, eg

rm -rf Flipper\@connerdev

Damn thanks so much, it actually worked, and removing it actually fixed the issue, can't believe I managed to figure out at least what to do by myself

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, LloydLynx said:

If you wanna delete the folder you're currently in, do...

rm -rf $PWD

"$PWD" will automatically insert your current directory into the command. 

Trouble is if you are accidentally in the wrong folder, you don't know until its too late.  Sure you SHOULD always check, but once you get into the swing of using the terminal, accidents happen.

 

Far better to do it from the parent directory,  type the first few letters then hit tab (to show matches or autocomplete if there is only one) for sanity checking.  If it doesn't list the directory you want, you know you're in the wrong place.  Plus at least with a typo there's only a slim chance anything you didn't intend will get deleted.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×