All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Get fully qualified domain names (FQDNs) for IP address with failure and multiple detection

Use Linux coding style in C program
put "-linux" option into $HOME/.indent.pro to make it default

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Pack up some files into a tarball on a remote server without writing to the local filesystem
I recently found myself with a filesystem I couldn't write to and a bunch of files I had to get the hell out of dodge, preferably not one at a time. This command makes it possible to pack a bunch of files into a single archive and write it to a remote server.

vim insert current filename
insert filename Normal mode: "%p Insert mode: %

apt-get upgrade with bandwidth limit
Trickle is here: http://monkey.org/~marius/pages/?page=trickle Trickle is a simple bandwidth limiter

Terminal redirection
can display the commands and their output to another user who is connected to another terminal, by example pts/3

Simple multi-user encrypted chat server for 5 users
Client ~$ ncat --ssl localhost 9876 Change localhost to the correct ip address.

Force unmount occupied partition
Alternative if "Lazy unmount" (umount -l) doesn't obey. Alternative for NFS: $ umount -f /media/sdb1 Use with caution: forcing to unmount a busy partition can cause data loss!

Git fetch all remote branches


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: