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

tail -f a log file over ssh into growl

Insert a line for each n lines

Show latest changed files

Hide or show Desktop Icons on MacOS
Hides all Files and Folders on the MacOS Desktop. To show files and folders, type "true" instead of "false". "Finder" at the end is case sensitive, "finder" doesn’t work

Create a self-extracting archive for win32 using 7-zip
using `cat` under *NIX - just because you help manage M$ Windoze *doesn't* mean you should have to resort to using it! You can also make custom win32 installers with the 7zip "extras" package: $ cat /path/to/7zSD.sfx /path/to/config.txt /path/to/archive > setup.exe

send substituted text to a command without echo, pipe
zsh only - This avoids the need for echo "message" | which creates an entire subshell. Also, the text you are most likely to edit is at the very end of the line, which, in my opinion, makes it slightly easier to edit.

calulate established tcp connection of local machine
If you want prepend/append text just wrap in echo: $echo Connected: `netstat -an|grep -ci "tcp.*established"`

Validate date, also a date within a leap year
Important to know: a valid date will return 0, otherwise 1!

Kill all Zombie processes if they accept it!
Tested on FreeBSD 8.1 and CSH. The scripts works correctly but the Zombies do not die! I hope it will run and function as expected in Linux and others.

Generate binary sequence data


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: