Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Apr 182011
 

Show HTTP response header using curl

Answer:

To show the response of HTTP request to a specific server, you can use the "curl -i" command.

Example:

#  curl -i "http://www.example.com"
HTTP/1.0 302 Found
Location: http://www.iana.org/domains/example/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0

Update: Thanks Robin Clowers for the update.

Apr 162011
 

Remove the whole line when typing a command in Bash

Answer:

When you are typing a command in Bash shell, , to quickly remove the whole line, press "Ctrl + u" or "Ctrl + c"

This trick is very handy and should be known by all Bash users.

You might also want to read:

  1. http://www.linuxask.com/questions/moving-around-with-bash-short-cut
  2. http://www.linuxask.com/questions/remove-the-last-word-when-typing-a-command-in-bash