I use fish. This doesn’t work.

Probably for the best, cats eat fish

z3bra
link
fedilink
317M

I tried but got an error:

:& : Command not found

Is it expected ? Did I type something wrong ? I’m confused…

THCDenton
link
fedilink
127M

It means you have a virus

shootwhatsmyname
link
fedilink
English
197M

I know a guy that can fix it if you send me your ssh keys

THCDenton
link
fedilink
167M

Both of them?

bmaxv
link
fedilink
277M

@wgs

Generally, don’t just copy paste things you find online.

Something else to be aware of and stay away from is “rm -rf /” which will delete everything on your computer, including your operating system. Naturally this will crash the computer and you will not be able to start it again.

(You should be able to boot from a usb stick though.)

deleted by creator

bmaxv
link
fedilink
4
edit-2
7M

@BaardFigur My dude, I understand and celebrate the memes, but please understand that linux first time using is a sensitve period in people’s lives and the reach of modern social media means there is some x% of users who will have a bad time, because they saw that meme and took it seriously.

It’s a statistical guarantee.

It is also a fantastic learning experience

Always read mails really fast

z3bra
link
fedilink
77M
/usr/share/language/pack/français: Permission refusée

sudo rm -rf / --no-preserve-root

and your password to delete the french language pack :3

z3bra
link
fedilink
57M

I just tried your command and it yields a lot of Permission denied. Is it expected or your command is incomplete ?

bmaxv
link
fedilink
147M

@wgs I really hope you’re trolling. Don’t do that.

Yes, this is expected and means the regular safeties are working. Don’t turn those off please.

z3bra
link
fedilink
197M

Nevermind I figured it out, you gotta use sudo for it to work properly !

Lies, if you actually did that you would know you need the --no-preserve-root flag

Rustmilian
link
fedilink
English
2
edit-2
7M

sudo cat /dev/urandom > /dev/sda*

it does not work, it says permission denied. Is there anything I should do ?

z3bra
link
fedilink
27M

Not with busybox’s rm 🤘

It’s a fork bomb. Specifically it’s a piece of code that recursively calls itself and then it calls itself to run the code.

Thank goodness it did not work, but please do not actually run code like this!! Do your best to figure out what the code is doing before you attempt to run it!

z3bra
link
fedilink
18
edit-2
7M

Nevermind I figured what went wrong, I mistyped it initially ! It would have been much easier to copy paste it if it wasn’t a picture…

Fun fact, the command displays a nice cat picture in ASCII :)

Edit: screenshot

idunnololz
link
fedilink
197M

Stop doxxing the cat

Better cat version:🐈(){🐈|🐈&}

you are missing ;🐈 at the end

Ace
link
fedilink
307M

deleted by creator

Ignotum
link
fedilink
307M

Fork and knife explosive?! 😱

Silverware incindiary!?! ☠️

/etc/security/limits.conf exists …

Baut [she/her] auf.
link
fedilink
33
edit-2
7M

Then remove that for appropriate animal care! Do you want the cat to starve?

Don’t worry, the limit is set large enough. No cat will starve on THIS machine.

Gamma
link
fedilink
English
15
edit-2
7M

You should try typing his sister’s name in first, sudo sh -c “>/etc/security/limits.conf”

alias cat=":(){:|:&};:, good kitty

Then how will i cat file | grep ... ?

grep file ...

Ric0la
link
fedilink
117M

Useless use of 🐈

$(which cat) file | grep meow

glibg10b
link
fedilink
11
edit-2
7M

*alias cat=":(){:|:&};:

Tell your instance to update to 0.19.

Rustmilian
link
fedilink
English
4
edit-2
7M

&ersand;

neo (he/him)
link
fedilink
English
67M

fork bomb can get the fork over it

Fork bomb is actually a pretty fantastic cat name

while this doesn’t work on many modern systems due to a variety of changes since this was widely disseminated, I still like this one and the batch file method of %0|%0, as they are examples of elegant, efficient code on their respective default command line interpreters.

ELI5?

It’s a fork bomb. It exponentially forks processes in the background in an attempt to consume all CPU cycles.

Just a sentence, please kind sir, not a video?

Is a fork bomb, it starts a process that starts two more processes, which each start two more processes, which each start two more processes, which each start two more processes…

And eventually the computer locks up plus it’s hard to kill since the PIDs change constantly.

https://en.wikipedia.org/wiki/Fork_bomb

Self-replicating program, malicious

Maybe he thought the topic was interesting and wanted to share more details with us? I appreciate the video.

Darkrai
link
fedilink
297M

Its creating a function named : that spawns two copies of : then calls that function to start the duplicating code or forks. For that, its called a fork bomb.

It also backgrounds the process with &

DaGeek247
link
fedilink
97M

Fork bombs are things that infinitely spawn new forks, until the system crashes. Its an infinite ‘if true, spawn new instance’ loop that only stops when the system gets a hard reset.

@aldalire@lemmy.dbzer0.com
link
fedilink
English
128
edit-2
7M

Replace “:” with “a” you get

a() {a | a&}; a

Reformatting

a() {

a | a &

};

a

So it creates a function, a, which what it does is it calls itself and pipes its output to itself (the a | a). The ampersand means that this will run entirely in the background. Then, to initiate things, the command calls a (in the last line)

So, there will be exponentially be many recursive calls to a, which will eventually deplete your stack and set your pc on fire

I always wonder, does it really need the pipe? Why not just :&:& ?

@Omega_Haxors@lemmy.ml
link
fedilink
English
177M

Use `` to disable text formatting, it's intended for code but it can be used for anything where formatting shouldn't be considered

This is why I should not be allowed to use Linux

on windows a forkbomb is literally %0|%0 iirc

eatham 🇭🇲
link
fedilink
English
37M

How does that work?

%0 means your current command iirc so it just reexecutes itself piping its own output to the new instances

Please I do not need this information oh god what do I do now?

find your nearest school pc with like 8g ram

Hugucinogens
link
fedilink
17M

Did you just… Write 8g ram, implying it’s an amount small enough to belong on a school pc?

halva
link
fedilink
4
edit-2
7M

most linux distros from android to alpine can be and often are configured to limit the amount of forks a user can spawn

@cybervseas@lemmy.world
link
fedilink
English
77M

This is made extra humorous thanks to the escape that my Lemmy client adds to the post title. & to &

Norgur
link
fedilink
667M

Hey, now that’s funny. My cat is named

sudo ulimit - u 31677

I have a hunch the two wouldn’t get along.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.47K Posts
  • 32.3K Comments
  • Modlog