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

Write and read HDD external
Write and read HDD external FreeBSD

Open in TextMate Sidebar files (recursively) with names matching REGEX_A and not matching REGEX_B
This does the following: 1 - Search recursively for files whose names match REGEX_A 2 - From this list exclude files whose names match REGEX_B 3 - Open this as a group in textmate (in the sidebar) And now you can use Command+Shift+F to use textmate own find and replace on this particular group of files. For advanced regex in the first expression you can use -regextype posix-egrep like this: mate - `find * -type f -regextype posix-egrep -regex 'REGEX_A' | grep -v -E 'REGEX_B'` Warning: this is not ment to open files or folders with space os special characters in the filename. If anyone knows a solution to that, tell me so I can fix the line.

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

Convert a string to

Poor man's unsort (randomize lines)

list block devices
Shows all block devices in a tree with descruptions of what they are.

Kill all processes belonging to a single user.

Search $PATH for a command or something similar
Searches your $PATH for whatever you substitute for bash, though not sure if this will work if you substitute a different shell for bash!

nmap IP block and autogenerate comprehensive Nagios service checks
More info here: http://nagioswiki.com/wiki/index.php/Autocreating_Nagios_Configuration_with_Nmap_and_Nmap2Nagios.pl

check open ports without netstat or lsof


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: