Tag Archives: ubuntu

Lmao: Command Line Russian Roulette For Linux and Unix Users

Lmao: Command Line Russian Roulette For Linux and Unix Users

Russian Roulette is a fatal game of chance in which a player places a single round in a revolver, spins the cylinder, places the muzzle against their head, and pulls the trigger.

Command line Russian Roulette for Linux and Unix system

Of course, you can play such game on your Linux or Unix server too (don’t run the following commands on your PC/MacOS/Unix/Linux system as it will delete everything):

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
OR
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo *Click*

Above shell kung-fu deletes all your files one out of six times. Hence, you must not run it in production. Here is a safe version:
[ $[ $RANDOM % 6 ] == 0 ] && echo '*Oh nooo*' || echo '*Click*'

Command Line Russian Roulette Comic

Of course, there is a comic too:

Russian roulette comic

Credit: Russian roulette comic

And someone tried to hire a couple of devs/ops/sysadmin using the following ad:

Hmm … #unix #linux #osx #bashshell #gnu pic.twitter.com/hEXnsTQrH8

— nixCraft (@nixcraft) May 4, 2016

Halal Vitamins

Powered by WPeMatico

Failed to set locale, defaulting to C warning message on CentOS Linux when running yum

Failed to set locale, defaulting to C warning message on CentOS Linux when running yum

Whenever I run yum command, I get an error or warning that read as Failed to set locale, defaulting to C. How do I fix this issue on CentOS 7 Linux server? Why do I get “Failed to set locale, defaulting to C” when using yum on CentOS 6 or Fedora Linux system? How do I fix it?
Halal Vitamins

Powered by WPeMatico

When you delete a line of code that you thought was useless…

When you delete a line of code that you thought was useless…

Or when you run rm -rf / on Linux or Unix-like system 😉

rm-rf

rm-rf

Another gif showing the same issue:

Delete a block of code

Delete a block of code

Now, I am hitting u, u, u in vim to undo (ctrl-z in other IDE) like a maniac to get back that line or a code block. Lmao.

Halal Vitamins

Powered by WPeMatico

Linux and Unix chown and chmod command security problem illustrated

Linux and Unix chown and chmod command security problem illustrated

The chown command change file owner and group. The chmod command change file mode (bits) i.e. permission. A wrong permission can create problems on Linux or Unix-like system. It is clearly illustrated in this comic.

chown and chmod

chown and chmod

Credit: turnoff.us

Halal Vitamins

Powered by WPeMatico

HandBrake For Mac Mirror Server Was Compromised And Infected With PROTON Malware

HandBrake For Mac Mirror Server Was Compromised And Infected With PROTON Malware
HandBrake is an open-source and free transcoder for digital video files. It makes ripping a film from a DVD to a data storage device such as NAS boxes easier. HandBrake works Linux, macOS, and Windows. A Recent version of Handbrake for Mac and possibly other downloads at the same site infected with malware. If you have downloaded HandBrake on Mac between 2/May/2017 and 06/May/2017, you need to delete the file ASAP. HandBrake infected with a new variant of OSX.PROTON malware.
Halal Vitamins

Powered by WPeMatico