this post was submitted on 16 Feb 2024
645 points (100.0% liked)

196

16245 readers
2310 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
645
Rule for Beginners (lemmy.world)
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

cross-posted from: https://lemmy.dbzer0.com/post/14479799

Linux Best Practices

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 7 months ago

To me this is no different than telling someone to kill themselves as a joke.

It was funny years ago as a teenager but now it's just mean and a dick move.

[–] [email protected] 3 points 7 months ago

Is this, like, the delete system 32 of Linux?

[–] [email protected] 16 points 7 months ago (2 children)

This is

Sudo - Super user do; or root < admin

RM - Remove

F - forced, it won’t warn you that you are deleting your system

R - Recursively, it will delete every directory hereafter

/ - the start of your system…so everything but it not being there would do this as well

Never rm -rf if you actually need to do it for something then you know well enough that it is necessary

[–] [email protected] 5 points 7 months ago

Thank you for the breakdown. Always wondered what those commands meant

[–] [email protected] 6 points 7 months ago (1 children)

Ah the linux version of delete system32 or charge your phone in the microwave.

[–] [email protected] 4 points 7 months ago

It's more like delete C:/

System32 and everything else.

[–] [email protected] 33 points 7 months ago (4 children)

I get these are jokes but I really don’t find anything funny about it, it becomes a meme and then people start getting more creative and pushing it more and being more covert and people come up with other little japes then new Linux users get their shit destroyed and maybe important info gets lost or precious memories so they say Linux is a piece of shit and go back to windows.

It’s not even funny to start with so when it inevitably inspires people to be assholes and bullies that’s all we’ve achieved.

copied from the original post but was exactly what was going through my mind

[–] [email protected] 4 points 7 months ago

Absolutely agreed. I caught major flak the last time that I saw this. Not a fan of setting up ignorant newbs to be laughed at and potentially need to write fresh resumes. Yeah, you shouldn't take a meme at face value for advice on your professional life but, it just comes across as a bit mean-spirited.

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (1 children)

This is not malicious because it will not work. You'd need --no-preserve-root to actually do anything.

Edit seems I was wrong

[–] [email protected] 5 points 7 months ago

The use of /* might get around that, because the shell expands it to /usr /var /lib /home etc.

[–] [email protected] 9 points 7 months ago

Yeah it's a joke that's at least a decade old, probably over two decades old.

And one of the most important aspects of comedy is knowing your audience. If this was said to a group of linux sysadmins I guess it's not dangerous, but it's still an old joke so not going to get much of a laugh. But if it's said to people new to linux, then it can cause damage. So it's either not funny (we all heard that one before) or an asshole prank, so not funny and malicious.

[–] [email protected] 7 points 7 months ago (3 children)

Imagine the typo sudo rm -rf /

[–] [email protected] 1 points 7 months ago (1 children)

What do you think this means?

[–] [email protected] 1 points 7 months ago (1 children)
[–] [email protected] 2 points 7 months ago

I just don't understand where a typo comes into play. OP achieves the same result.

[–] [email protected] 10 points 7 months ago* (last edited 7 months ago) (1 children)

The order of flags don't matter on the rm command, so rm -rf == rm -fr

[–] [email protected] 1 points 7 months ago
[–] [email protected] 3 points 7 months ago (1 children)

...that is in fact the joke

[–] [email protected] 1 points 7 months ago (1 children)

Not quite, flags don't care about the order they are in.

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago)

That's exactly why that is the joke omg lol 🤦‍♀️

[–] [email protected] 26 points 7 months ago (1 children)
[–] [email protected] 3 points 7 months ago (1 children)
[–] [email protected] 2 points 7 months ago (1 children)
[–] [email protected] 2 points 7 months ago

Here is an alternative Piped link(s):

https://piped.video/VFevH5vP32s?t=54s

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] [email protected] 9 points 7 months ago (1 children)

Nah I’m going to leave it there in case one day I want to read French

[–] [email protected] 10 points 7 months ago (2 children)
[–] [email protected] 4 points 7 months ago (1 children)

You misspelled "Arch user"

[–] [email protected] 3 points 7 months ago (1 children)

Arch user won't even have a language pack if he doesn't install it

[–] [email protected] 1 points 7 months ago* (last edited 7 months ago)

True Arch Linux user doesn't need a single language pack

Including English

[–] [email protected] 2 points 7 months ago

Hey I mean if the shoe fits right? Why fight it.

[–] [email protected] 29 points 7 months ago (2 children)

In 20+ years of linuxing, I've never thought about putting the f first until now.

[–] [email protected] 1 points 7 months ago

I always put the f last, as in first the whole command, then go back and write the -rf, just because if I accidentally press enter I don't want an uncompleted path to be destroyed.

[–] [email protected] 2 points 7 months ago (3 children)

Imagine my mixed emotions when I’ve been doing ‘ls -la’ since I remember and watch someone do ‘ls -al’.

[–] [email protected] 1 points 7 months ago

I always do - lha or -la, but sometimes I did -a and I want the L, so I reuse the old command and add a l, making it -al.

[–] [email protected] 1 points 7 months ago

I use -al because it's in alphabetical order and reminds me of "all".

[–] [email protected] 2 points 7 months ago

I cut my teeth on DOS. I use dir instead of ls. Please don't shame me.

load more comments
view more: next ›