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

Running a command at a specific time

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

Check if your desired password is already available in haveibeenpwnd database. This command uses the API provided by HIBP

stringContains: Determining if a String Contains a Substring

Batch edition of all OpenOffice.org Writer files in the current directory (body text)
This function does a batch edition of all OOO3 Writer files in current directory. It uses sed to search a FOO pattern into body text of each file, then replace it to foo pattern (only the first match) . I did it because I've some hundreds of OOO3 Writer files where I did need to edit one word in each ones and open up each file in OOO3 gui wasn't an option. Usage: bsro3 FOO foo

Find the package that installed a command

Execute a command at a given time
This is an alternative to cron which allows a one-off task to be scheduled for a certain time.

execute a shell with netcat without -e
Shorter version with proper stderr redirection .

Prepend a text to a file.
Prepend text to a file. It doen't need temporary files, ed or sed.

spawn shell listener service with nc


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: