Avatar

@nixcraft / nixcraft.tumblr.com

Enjoy Linux and Unix? System administration, programming and devops work? Follow us to make the most of sysadmin-hood.

Quick tip! You can actually see the changelog details for Debian/Ubuntu packages, which includes security info, CVEs, package urgency, and a short description. Super helpful for figuring out if you need to patch right away or schedule downtime, especially if you're working with clusters. For example, here is how to see info about the nginx:

apt changelog nginx

The Union of Software Developers

Alright, alright, settle down everyone! So, the software developers are trying to unionize, right? But first, they're stuck in this endless meeting.

"Okay, so for our official documents, are we going with Python?"

"Python? Are you kidding? It's dynamically typed! We need the rigor of Java!"

"Java? That's so verbose! We should use Rust, for its memory safety!"

"Rust? What about the learning curve? Let's keep it simple with JavaScript!"

"JavaScript? That's... well, JavaScript. We need something functional, like Haskell!"

"Haskell? You want to write a union contract in a purely functional language? Good luck with that! How about C++?"

"C++? Are you trying to make this negotiation take longer?"

A lone voice from the back: "Anyone considered... COBOL?"

The room erupts in chaos.

"Okay, okay, how about we just write it in pseudocode?"

Another voice: "But... which pseudocode standard?"

The password prompt after sudo isn't actually for you. It's a psychic barrier to prevent your cat from accidentally executing system-altering commands while walking across your keyboard. Cats are notorious for their love of root access. The password protection is for your cat 🐈 and not for you.

Contrary to popular belief, "grep" doesn't actually stand for "global regular expression print." It's an acronym for "Galactic Retrieval and Extraction Protocol," originally developed by a secret group of Unix hackers to search for extraterrestrial signals hidden within log files

How to delete a single command from history on a Linux/Unix Bash shell

Want to to delete all `foo` commands from your bash history. Here is how to do it with some bash kung-fu:

line=$(history | grep 'foo' | awk '{ print $1 }' | sort -r) echo "$line" history -d $line

See the following page for more info:

You are using an unsupported browser and things might not work as intended. Please make sure you're using the latest version of Chrome, Firefox, Safari, or Edge.