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

Show last changed files in a directory
This will quickly display files last changed in a directory, with the newest on top.

Automator Bash script to create Clean zips in MacOS Finder without __MACOSX metadata
Finder compresses to ZIP but always includes extraneous metadata files (__MACOSX and .DS_Store) files and folders that may confuse other programs. One alternative is creating them and then editing the ZIP. This can work standalone or in an automator script accepting multiple selections (files or folders) and creating one zip per argument/selected file without that metada.

Simulate typing

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"

extract all urls from firefox sessionstore
This will extract all of the urls from a firefox session (including urls in a tab's history). The sessionstore.js file is in ~/.mozilla/firefox/{firefox profile}

ps a process keeping the header info so you know what the columns of numbers mean!
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1828 0.0 0.0 5396 476 ? Ss 2008 0:00 /usr/sbin/sshd

Command line calculator
This opens a python command line. You can use math and random and float-division is enabled (without appending .0 to integers). I just don't know how to specify a standard precision.

Rot13 using the tr command
rot13 maps a..mn..z (A..MN..Z) to n..za..m (n..za..m) and so does this alias.

Query Wikipedia via console over DNS

Download all Delicious bookmarks


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: