Commands using sudo (537)

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

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

Filter the output of a file continously using tail and grep
The OPs solution will work, however on some systems (bsd), grep will not filter the data, unless the --line-buffered option is enabled.

Calculate days on which Friday the 13th occurs (inspired from the work of the user justsomeguy)
Friday is the 5th day of the week, monday is the 1st. Output may be affected by locale.

Sort a character string
Sorts a character string, using common shell commands.

put current directory in LAN quickly
This works on all versions of python 2.X. Tested on Linux and bundled python versions on Mac OSX and Solaris / UNIX Note: Serves globally on port 8000. Ctrl+c to stop. Don't start the server and leave it on a internet connected machine. :)

Remove a line from a file using sed (useful for updating known SSH server keys when they change)

Download all Delicious bookmarks

Compute the average number of KB per file for each dir
Shorter version using --tag

List subfolders from largest to smallest with sizes in human readable form

geoip information
A function that takes a domain name as an argument


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: