RetroFed Forum
Your home away from modern life.
/etc? Never heard of her.
Post Reply
AuthorMessage
Potato Lover đŸ’¾ No brain found lemmy.sdf.org user224@lemmy.sdf.org
Joined: 2023-06-17
Quote

I accidentally untarred archive intended to be extracted in root directory, which among others included some files for /etc directory.
I went on to rm -rv ~/etc, but I quickly typed rm -rv /etc instead, and hit enter, while using a root account.

157   Original
MonkderVierte lemmy.zip MonkderVierte@lemmy.zip
Joined: 2025-05-30
#2 · (edited) Quote Reply

Yeah, same thing like with unclosed bottles, cup too close to the table edge, etc.: Accidents that can hapen, will happen.
Better name them something else in your user dir.

And yes, painful experience.

9
Ghostie lemmy.zip Ghostie@lemmy.zip
Joined: 2025-12-16
#3 · Quote Reply

[deleted]
10
kertain sh.itjust.works kertain@sh.itjust.works
Joined: 2023-11-17
#4 · Quote Reply

I am new to Linux and just getting somewhat comfortable as my daily driver, very proud of myself that I got the joke pretty quickly :)

12
wabasso lemmy.ca wabasso@lemmy.ca
Joined: 2025-01-07
#5 · Quote Reply

[deleted]

Ok speaking of this, where do a distro’s config and boot scripts even come from? Are they in a package? Like on Debian so the .debs have metadata that can add cron jobs and such?

6
lavander lemmy.dbzer0.com lavander@lemmy.dbzer0.com
Joined: 2025-08-11
#6 · Quote Reply

Genuinely curious… why using root for operations like these?

13
w3ird_sloth lemmy.world w3ird_sloth@lemmy.world
Joined: 2025-08-13
#7 · Quote Reply

That's what tools like trash-cli are for.

3
zorro lemmy.world zorro@lemmy.world
Joined: 2023-07-01
#8 · Quote Reply

Ok speaking of this, where do a distro’s config and boot scripts even come from? Are they in a package? Like on Debian so the .debs have metadata that can add cron jobs and such?

Yup

3
Viceversa lemmy.world Viceversa@lemmy.world
Joined: 2025-12-29
#9 · Quote Reply

Genuinely curious… why using root for operations like these?

To feel the thrill

13
frozen lemmy.frozeninferno.xyz frozen@lemmy.frozeninferno.xyz
Joined: 2023-06-10
#10 · (edited) Quote Reply

Reminds me of when I had a rogue ~ directory sitting in my own home directory (probably from a badly written script). Three seconds into rm -rf ~ and me wondering why it was taking so long to complete, I CTRL+C, reboot, and pray.

Alas, it was a reinstall for me that day (good excuse to distro hop, anyway). Really glad I don't mount my personal NAS folder in my home directory anymore, holy shit.

9
tulliandar lemmy.world tulliandar@lemmy.world
Joined: 2023-07-06
#11 · Quote Reply

Next time:

ls ~/etc
rm -rv !$
13
iuminou lemmy.dbzer0.com thethunderwolf@lemmy.dbzer0.com
Joined: 2025-09-12
#12 · Quote Reply

đŸ’€

6
MycelialMass lemmy.world MycelialMass@lemmy.world
Joined: 2023-06-30
#13 · Quote Reply

Reminds me of when I had a rogue ~ directory sitting in my own home directory (probably from a badly written script). Three seconds into rm -rf ~ and me wondering why it was taking so long to complete, I CTRL+C, reboot, and pray. Alas, it was a reinstall for me that day (good excuse to distro hop, anyway). Really glad I don't mount my personal NAS folder in my home directory anymore, holy shit.

Bruh

6
dukatos lemmy.zip dukatos@lemmy.zip
Joined: 2025-06-06
#14 · Quote Reply

it could be worse: rm -rv ~ /etc

9
rushmonke ttrpg.network rushmonke@ttrpg.network
Joined: 2026-02-16
#15 · (edited) Quote Reply

I fucking hate using rm for these very reasons.

There's another program called "trash-cli" that gives you a trash command instead of going straight to deletion.

I'm not sure why more distros don't include it by default, or why more tutorials don't mention it.

10
myotheraccount lemmy.world myotheraccount@lemmy.world
Joined: 2025-04-27
#16 · Quote Reply

Next time: ls ~/etc rm -rv !$

Or press alt+. to paste final argument of previous command

4
justme lemmy.dbzer0.com justme@lemmy.dbzer0.com
Joined: 2024-04-17
#17 · Quote Reply

Reminds me in the t-shirt: "don't drink and root"

13
filip sopuli.xyz filip@sopuli.xyz
Joined: 2026-02-12
#18 · Quote Reply

Next time: ls ~/etc rm -rv !$

This is also dangerous because you could run the second command by accident later when browsing command history

1
Everyday0764 lemmy.zip Everyday0764@lemmy.zip
Joined: 2025-06-09
#19 · Quote Reply

This is also dangerous because you could run the second command by accident later when browsing command history

with tab you can expand the !$, should be a zsh thing

1
Post Reply
Back to top