Commands tagged curl (212)

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

Display rows and columns of random numbers with awk
Displays six rows and five columns of random numbers between 0 and 1. If you need only one column, you can dispense with the "for" loop.

Execute a command without saving it in the history
Yes, by correctly setting the HIST* variables you can make certain commands not saved in history. But that's complicated and easy to make a mistake. If you set HISTFILE= to blank, nothing in your current shell session will be saved in history. Although this is not a precise answer to the subject, but it's very simple.

Execute MySQL query send results from stdout to CSV
You can, of course, tell MySQL to output results to a file and dictate how to terminate lines, etc. But sometimes you don't have access to the file system MySQL is running on, complicating outputting your results to a CSV, necessitating either annoying hacks or this simple command :D

Force the script to be started as root
Will run the script as root and exit if the wrong or no password is given. Also will keep the parameters active if any where given.

Set laptop display brightness
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video). $ cat /proc/acpi/video/VGA/LCD/brightness to discover the possible values for your display.

Install pip with Proxy
Installs pip packages defining a proxy

Show apps that use internet connection at the moment. (Multi-Language)
for one line per process: $ ss -p | cat for established sockets only: $ ss -p | grep STA for just process names: $ ss -p | cut -f2 -sd\" or $ ss -p | grep STA | cut -f2 -d\"

create a nicely formatted example of a shell command and its output
Shell function which takes a bash command as its input, and displays the following formatted output: EXAMPLE: command OUTPUT: output from command

Get all the keyboard shortcuts in screen
Displays a list of all the basic keyboard shortcuts in screen.

Display the top ten running processes - sorted by memory usage


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: