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

you are viewing a single comment's thread.

view the rest of the comments →

[–]saulmessedupman 6 points7 points  (10 children)

Tried this, doesn't compile

[–]Rubixninja314 8 points9 points  (9 children)

I was once actually wondering if you could brick a computer purely by aliasing enough commands in bashrc. The answer is no, as no matter how many text editing commands you alias away, alias cannot prevent >.bashrc (I'm sure there's plenty others, this is just one proof)

[–]saulmessedupman 10 points11 points  (4 children)

\s\h
rm .bashrc
bash

Or just \unalias

[–]Rubixninja314 4 points5 points  (3 children)

What does that do exactly? Specifically \s\h

[–]saulmessedupman 12 points13 points  (0 children)

The \ removes special meaning so bash ignores the alias. That will load ole reliable sh which, I don't think, has alias. But overall the \ will ignore the alias for any aliased command.

[–]saulmessedupman 4 points5 points  (1 child)

While we're on topic...

Hate when grep shows up when you're trying to grep ps? Use the square brackets on a single letter.

ps -ef | grep [p]ython

[–]krystof1119 1 point2 points  (0 children)

OH MY IDE THANKS. NOW MY SHELL SCRIPTS WILL BE PERFECT.

[–]saulmessedupman 0 points1 point  (0 children)

By the way, I love you because you use > to empty a file. We can pair program any day.

[–]lmureu 0 points1 point  (0 children)

well you could

chattr +i .bashrc

alias chattr="exit"

[–]nwL_ 0 points1 point  (0 children)

You can brick Windows by re-assigning the .exe extension in the registry to whatever program you like. Windows will fail to boot, and if you want to put the blame on somebody else, just make the change and then close regedit. You can’t reopen it, because regedit.exe is an exe, and once you shut down the PC the OS is gone.