Commands by flanB (2)

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

Exclude inserting a table from a sql import
Starting with a large MySQL dump file (*.sql) remove any lines that have inserts for the specified table. Sometimes one or two tables are very large and uneeded, eg. log tables. To exclude multiple tables you can get fancy with sed, or just run the command again on subsequently generated files.

Download mp3 files linked in a RSS podcast feed
Directly download all mp3 files of the desired podcast

Perl Command Line Interpreter
My Programming Languages professor assigned my class a homework assignment where we had to write a Perl interpreter using Perl. I really like Python's interactive command line interpreter which inspired this Perl script.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Edit 2 or more files in vim using vim -d
Is this not the same

Quickly generate an MD5 hash for a text string using OpenSSL
Here Strings / A variant of here documents, the format is:

Recursively Add Changed Files to Subversion
Extracted from http://www.howtogeek.com/wiki/Recursively_Add_Changed_Files_to_Subversion

Generate Random Text based on Length

easily strace all your apache processes
This one-liner will use strace to attach to all of the currently running apache processes output and piped from the initial "ps auxw" command into some awk.

List contents of jar
useful to find the list of dependencies


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: