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

Convert CSV to JSON - Python3 and Bash function
Based / Inspired by malathion's below command http://www.commandlinefu.com/commands/view/20528/convert-csv-to-json Is written for python3 and is very easy to use csv2json *csv will convert all files ending in csv to json eg csv2json file.csv will output a file to file.json Validity of json tested in python3 and below site https://jsonformatter.curiousconcept.com/

Trim linebreaks

view hex mode in vim

backs up at the date today

Get the IP address
gives u each configured IP in a seperate line.

attach to bash shell in the last container you started

Get simple weather info from a zip code
$ weather 97405

Get your IP addresses
Shows the interface and the ip-address

Escape forward slashes in a variable
For example $ path="/etc/apt/sources.list"; echo ${path//'/'/'\/'} will print $ \/etc\/apt\/sources.list

Go to parent directory of filename edited in last command


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: