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

list files recursively by size

check python syntax in vim

Allow any local (non-network) connection to running X server

Human readable directory sizes for current directory, sorted descending

Get Your IP Geographic Location with curl and jq

scp file from hostb to hostc while logged into hosta
While at the command line of of hosta, scp a file from remote hostb to remote hostc. This saves the step of logging into hostb and then issuing the scp command to hostc.

Split File in parts
Split File in 19 MB big parts, putting parts together again via cat Nameforpartaa Nameforpartab Nameforpartac >> File

Watch contents of a file grow
In this case, I'm keeping an eye on /var/log/messages, but of course any file will do. When I'm following a file, I generally don't want to see anything other than what has been added due to the command or service I've executed. This keeps everything clean and tidy for troubleshooting.

Programmatic way to find and set your timezone
1. it find your public ip via ifconfig.io 2. than use this IP to request your timezone via worldtimeapi.org 3. and send it to the command timedatectl set-timezone

list files recursively by size


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: