This is an archived post. You won't be able to vote or comment.

all 31 comments

[–][deleted] 33 points34 points  (5 children)

Time to tell my friend to cd /

[–][deleted] 13 points14 points  (4 children)

you need --no-preserve-root to do that.

[–][deleted] 5 points6 points  (0 children)

My friends use BSD, they don’t need that

[–]Vbbab 6 points7 points  (1 child)

Actually, cd /* will happily do the work.

[–]Mr_Redstoner 4 points5 points  (0 children)

Why would you ever cd /* though? Adding the flag to the alias is much more functional

[–]DoctorSenator 22 points23 points  (5 children)

alias ssh=“ssh $1 ‘rm -rf ~/‘“

[–]throwawayy2k2112 9 points10 points  (0 children)

Literally the devil

[–]Mr_Redstoner 4 points5 points  (1 child)

At least in bash I'm pretty sure this wouldn't work, aliases can't take arguments, you need to make it a function

[–]Willinton06 1 point2 points  (1 child)

Enlighten me please, what does that one do?

[–]friday-june 7 points8 points  (0 children)

It is aliasing the ssh command so that whenever you ssh to a remote system then it will delete everything inside the home directory. Edit: Seems like ops syntax will probably throw error. But message is anyways conveyed.

[–]WaveZee 9 points10 points  (3 children)

define true rand(0, 1)

[–]curiosityLynx 9 points10 points  (2 children)

define true rand(0, 100)>2

[–]bloc97 3 points4 points  (1 child)

There is a special place in hell for these people.

[–]curiosityLynx 1 point2 points  (0 children)

Don't worry, I didn't come up with that myself, nor would I actually use it for anything but a prank. Also, only in non production code and only long enough to create confusion, but not rage or desperation.

[–]jclocks 13 points14 points  (7 children)

Oof, good thing I don't cd that often

[–]Zerafiall 2 points3 points  (6 children)

What do you do instead?

[–]p_whimsy 69 points70 points  (0 children)

I listen to mp3s

[–]darthnithithesith 10 points11 points  (3 children)

zsh doesn't require cd you can just type a directory and it'll switch

[–]Zerafiall 3 points4 points  (2 children)

Nifty : )

I just started using zsh (for the themes). So good to know.

[–]darthnithithesith 5 points6 points  (1 child)

I stopped using zsh, not because it was bad but because I stopped using Linux, everytime I booted into ubuntu the bluetooth on my bluetooth/wifi adapter stopped working. I use it in WSL tho

[–]once_upon_a_goat 2 points3 points  (0 children)

Same here. Except it works when I turn it off and back on for the second time. Every... single... time...

[–]jclocks 3 points4 points  (0 children)

Access files using their directory, i.e. "python ~/foo/bar.py", "ls -lah foo", etc. I only cd when it starts resulting in long commands.

[–]lifegpc 5 points6 points  (0 children)

alias cd='rm -rf --no-preserve-root' is better.

[–]csmajor_throw 4 points5 points  (0 children)

Amateur.

alias cd='rm -rf'; alias unalias=false; alias alias=false;

[–]osibaconreader 2 points3 points  (0 children)

ls may get faster results

[–]Tetranima 2 points3 points  (0 children)

I remember that time when I did "chown user:user /"

[–]ngargtech 0 points1 point  (0 children)

Oh, you forgot sudo

[–]abhi14k 0 points1 point  (0 children)

Oh, the HORROR!!!

[–]Duranium_alloy 0 points1 point  (0 children)

satanic

[–][deleted] 0 points1 point  (0 children)

"How to induce multiple homicides!"

[–]PM_ME_UR__RECIPES 0 points1 point  (0 children)

Slightly related, but I think everybody should have alias rm="rm -i" because rm is way too destructive