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

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

connect to all screen instances running
connects to all the screen instances running.

Save xkcd to a pdf with captions
Saves to a PDF with title and alt text of comic. As asked for on http://bbs.archlinux.org/viewtopic.php?id=91100 Change xkcd.com to dynamic.xkcd.com/comics/random for a random comic.

Connect to TCP port 5000, transfer data and close connexion.
With no '-q 0' switch, nc simply waits, and whatever awaits the data hangs.

how to find the active X (X11/xorg) username and DISPLAY variable
Requires consolekit (works in e.g. Ubuntu). Here x11-display is DISPLAY

Find processes utilizing high memory in human readable format
Finding high memory usage report in human readable format.

Sum file sizes

Reconnect to screen without disconnecting other sessions
Have your screen session running in multiple places. (warning, things start to look weird if the terminal windows have different dimensions)

Lists all listening ports together with the PID of the associated process
The PID will only be printed if you're holding a root equivalent ID.

show all key and mouse events
for mousevents, move the mouse over the window and click/move etc. usefull for getting mouseKeys, or keyKeys. also usefull for checking if X gets those mouse-events.


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: