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

Print a horizontal line

resolving basic authentication problem(401) with wget
I have a server with a php requiring basic authentication, like this:

Perl Command Line Interpreter
Read, Evaluate, Print, Loop - REPL

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Disco lights in the terminal

Print a random 8 digit number
Don't need to pipe the output into rs if you just tell jot to use a null separator character.

CLFUContest : Check which process consume more than 10% of the cpu (configurable)

sed /pat/!d without using sed (no RE; limited to shell patterns aka globbing)
POSIX requires this "string truncating" functionality. might as well use it, at least for very small tasks where invoking sed and using RE is overkill.

macOS: Save disk space by moving apps to external drives
Because Mac app bundles contain everything in one place, it makes running them from anywhere, including from a device such as a USB flash drive or external HDD, possible. So if your Mac has a mere 256GB of storage (as mine does), you can free up large quantities of disk space by storing apps like, say, Xcode on external devices.

Migrate existing Ext3 filesystems to Ext4
Before doing this, back-up all data on any ext3 partitions that are to be converted to ext4. After running previous command you MUST run fsck, is needed to return the filesystem to a consistent state. $ fsck -pDf /dev/yourpartition Edit /etc/fstab and change the 'type' from ext3 to ext4 for any partitions that are converted to ext4.


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: