this post was submitted on 14 Nov 2026
42 points (87.5% liked)

Linux

68768 readers
796 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
42
A joke... (lemmy.ca)
submitted 1 day ago* (last edited 1 day ago) by chenwu@lemmy.ca to c/linux@lemmy.ml
 

When I feel like scrapping the whole project and starting over:

Me: (in the project dir) sudo rm -rf /*
Me: (after waiting a while) Something feels off… Why is it taking so long to delete everything?
Me: (suddenly realizing) ^C ^C ^C
System: Press any key to continue...

当我想把整个项目推倒重做时:
我:(在项目目录)sudo rm -rf /*
我:(等了一会儿)有点不对劲。。。怎么删了这么长时间还没删完
我:(恍然大悟)^C ^C ^C
系统: Press any key to continue...

you are viewing a single comment's thread
view the rest of the comments
[–] tyranover@lemmy.blahaj.zone 5 points 4 hours ago (1 children)
rm -rf /*

This deletes everything in root; a great way to break your OS and lose all data too.

OP meant to run

rm -rf ./*

Note the period, which represents the current directory. So this deletes everything in the current directory instead of the entire filesystem

[–] chenwu@lemmy.ca 1 points 2 hours ago (1 children)
[–] intrepid@lemmy.ca 1 points 1 hour ago* (last edited 1 hour ago)

Why not just:

rm -r *

What is the necessity of that sudo, -f and /?

Disclaimer: I have carelessly committed this nonsense too. Thankfully, the important data was backed up. I used a live USB to access the nuked OS partition and used chroot to repopulate the deleted system files. Didn't even have to reinstall the OS.

Always have a disaster plan. If you have a btrfs partition, even periodic btrfs snapshots are a cheap lifesaver. Everything else can be saved like a breeze with some terminal magic.