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

Checks throughput between two nodes
This will show the throughput between two nodes. Thanks to szboardstretcher, who posted it here: http://www.linuxquestions.org/questions/linux-networking-3/quick-and-easy-way-to-measure-throughput-between-two-nodes-868998/

add the result of a command into vi
':r!ls -l' results in listing the files in the current directory and paste it into vi

create random numbers within range for conjob usage
if you need to install cron jobs in a given time range.

remove all spaces from all files in current folder

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Get full from half remembered commands
Show all commands having the part known by you. Eg: $apropos pdf | less

Find failures with journalctl
Sometimes things break. You can find the most recent errors using a combination of journalctl, along with the classic tools sort and uniq

Get all files of particular type (say, PDF) listed on some wegpage (say, example.com)
See man wget if you want linked files and not only those hosted on the website.

List hostnames of all IPs

Apply substitution only on the line following a marker
I've been auto-generating some complex GnuPlots; with multiplots the first plot of each group needs to be a 'plot' whereas the others need to be 'replots' to allow overplotting/autoscaling/etc to work properly. This is used to replace only the first instance of 'replot'.


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: