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

Read the output of a command into the buffer in vim
This will append the output of "command" to whatever file you're currently editing in vim. Who else has good vim tricks? :)

get all pdf and zips from a website using wget
If the site uses https, use: $ wget --reject html,htm --accept pdf,zip -rl1 --no-check-certificate https-url

Lists the supported memory types and how much your board can support.

Rebuild a Delimited File with a Unique Delimiter
Useful for CSV files. In the command, the file in question is comma delimited but contains double quoted fields containing commas and contains no @ symbols (as confirmed with http://www.commandlinefu.com/commands/view/9998/delimiter-hunting). This command converts the delimiting commas to @s while preserving the commas in the fields using the "uniqueString" to mark the ends of lines.

Show current iptables rules, with line numbers

Stream the latest offering from your fave netcasts/podcasts
This is a quick line to stream in the latest offerings of your favorite netcasts/podcasts. You will need to have a file named netcast.txt in the directory you run this from. This file should have one and only one of your netcast's/podcst's url per line. When run the line grabs the offering on the top of the netcast/podcast stack and end it over , quietly, to vlc. Since I move around computers during the day I wanted an easy way to listen to my daily dose of news and such without having to worry about downloading to whatever machine I am on. This is just a quick grab and stream of whats current. Future plans... have the list of netcasts be read from the web. possibly an rss or such. I use greader so there might be a way to use it as the source so as not to have to muck with multiple lists

Copy your SSH public key on a remote machine for passwordless login.
Should run on any system with ssh installed.

Show a 4-way scrollable process tree with full details.
If you want a visual representation of the parent/child relationships between processes, this is one easy way to do it. It's useful in debugging collections of shell scripts, because it provides something like a call traceback. When a shell script breaks, just remember "awwfux".

Print stack trace of a core file without needing to enter gdb interactively
The pstack command prints a stack trace of running processes without needing to attach a debugger, but what about core files? The answer, of course, is to use this command. Usage: gdbbt program corefile

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: