Absurd Linux Commands

How to prompt for confirmation before deleting a file.

Us humans are bound to make mistakes, so let's add safeguards to it! ๐Ÿ˜‡

 $ printf "Delete? [y/n]: " ; read ans ; test "$ans" = "n" && printf "Cancelled\n" || rm -i <filename> 

Even better, you can alias rm with this snippet! ๐Ÿ˜‹

 $ alias rm='printf "Delete? [y/n]: " ; read ans ; test "$ans" = "n" && printf "Cancelled\n" || rm -i' 

Now you will never worry about accidentally deleting a file again! Maybe... probably... It depends, really.

How to turn your Linux machine into a heater.

It's winter and it's cold, you don't have a blanket or a sweater. But do not worry! Just run the following command:

 $ sha512sum /dev/urandom 

Not enough? Want more heat? Just run more in parallel! ๐Ÿ”ฅ[1]

 $ sha512sum /dev/urandom ; sha512sum /dev/urandom ; ... 

How to play Beige Noise in your home.

Beige Noises, also known as ๐Ÿ˜ˆEvil White Noises๐Ÿ˜ˆ[2], is a type of noise that doesn't do absolutely anything beside giving you migraines and make your ears bleed.

 $ aplay /dev/urandom 

Footnotes
  1. Don't run too much in parallel, it might harm your computer and/or set your house on fire. Which is, um... great for the cold weather?
  2. Source: I made it up.