Questions tagged [url]

A Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where a particular resource is available – and the mechanism for retrieving it. They are often informally referred to as web addresses.

A Uniform Resource Locator (URL) is a specific type of Uniform Resource Identifier (URI) that specifies where an identified resource is available – and the mechanism for retrieving it. In popular usage, URLs are often incorrectly regarded as being the same as URIs; the other type of URI is the less common Uniform Resource Name (URN).

The best-known example of a URL is for the addresses of web pages on the World Wide Web, such as http://www.example.com/ and URLs are commonly informally referred to as web addresses.

The structure of all URIs (both locators and names) is:

scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
  1. The scheme specifies the mechanism (or protocol) for retrieving the resource, e.g., ftp or https
  2. The authority part consists of an optional authentication section (username and password), followed by a host (which may be expressed as a hostname or IP address) with an optional port number if non-standard ports are used.
  3. The path is similar to a filesystem path (and may map to one).
  4. There may be an optional query string of data (usually specified as name-value pairs separated by an ampersand, &).
  5. The final part (after #) is called the fragment; this can be used to specify a secondary resource within a document, e.g., a section heading.

On Unix systems, the command is commonly used to work with URLs.

146 questions
156
votes
2 answers

Any way to encode the url in curl command?

I have some url which has space in it's query param. I want to use this in curl, e.g. curl -G "http://localhost:30001/data?zip=47401&utc_begin=2013-8-1 00:00:00&utc_end=2013-8-2 00:00:00&country_code=USA" which gives out Malformed Request-Line As…
Aashish P.
  • 1,561
  • 2
  • 10
  • 3
154
votes
19 answers

Decoding URL encoding (percent encoding)

I want to decode URL encoding, is there any built-in tool for doing this or could anyone provide me with a sed code that will do this? I did search a bit through unix.stackexchange.com and on the internet but I couldn't find any command line tool…
DisplayName
  • 11,468
  • 20
  • 73
  • 115
38
votes
2 answers

Create a custom URL Protocol Handler

I would like to register a URL scheme (or protocol) handler for my own custom URL protocol, so that clicking on a link with this custom protocol will execute a command on that URL. Which steps do I need to take to add this handler? Example: I want…
palswim
  • 4,919
  • 6
  • 37
  • 53
30
votes
5 answers

Get URL's redirect target with curl

I would like to check where a single URL redirects. An example of that could be a link from Google's search result page (where a click always goes through Google server). Can I do that with curl?
syntagma
  • 12,091
  • 21
  • 57
  • 74
29
votes
2 answers

Terminal - create hyperlinks

I am creating Log-Reports which are viewable through the Web-browser. Is there an easy way to make links clickable in Linux Terminal? (Gnome-Terminal) I am copying those links and manually open my web-browser to achieve that right now.
user1767754
  • 427
  • 1
  • 4
  • 5
18
votes
1 answer

Why does this ffmpeg command work in bash and not zsh?

Today I got home from work (run bash on an Ubuntu box) and tried to run some code on my local arch box with my beloved zsh and the commands were failing? The command is below with the personal info and ip changed obviously ffmpeg -i…
John Allard
  • 1,318
  • 1
  • 14
  • 23
11
votes
4 answers

Firefox - reading out urls of opened tabs from the command-line

I sometimes have quite a big range of tabs open in Firefox and I prefer it to save them to a file, rather then using the build-in bookmarks. Therefore I (manually) copy the urls from the about:preferences page, save them to a file and process the…
nath
  • 5,430
  • 9
  • 45
  • 87
11
votes
2 answers

Is there a browser that supports IPv6 Link Local addresses?

I'd like to know at last one browser that allows me to browse fe80::4216:7eff:fe9f:79ac%enp2s0f0, for example. I've checked there're many tickets open in bug trackers of big name browsers like Firefox and Chrome. I know Internet Explorer on Windows…
oblitum
  • 915
  • 15
  • 29
11
votes
2 answers

Tell wget not to spider URL matching a pattern?

I want to test how my site would be behave when being spidered. However, I want to exclude all URLs containing the word "page". I tried: $ wget -r -R "*page*" --spider --no-check-certificate -w 1 http://mysite.com/ The -R flag is supposed to reject…
Question Overflow
  • 4,568
  • 19
  • 57
  • 84
8
votes
3 answers

Resolve filename from a remote URL without downloading a file

I am creating a script, which should download latest version of an application from repository and deploy the app. The main issue: there are several repositories and I need to check, which of them has most recent…
user1065145
  • 407
  • 1
  • 6
  • 14
8
votes
2 answers

Is the "computer:///" address only something symbolic, or can it be used somewhere?

I am using Linux Mint 15 (Mate). When I double click the Computer icon on my desktop to see the available drives, the address bar of file manager (Caja 1.6.1) shows this address: computer:///. Is this address just something symbolic, or can it be…
B Faley
  • 4,213
  • 11
  • 37
  • 48
7
votes
4 answers

xdg-open on debian 9 fails to open browser

I decided to try lxdm (was using fluxbox and xfce), and discovered that for many programs the url handler was failing, producing this error message; Quite strange as you can see, it's prepending the user directory to the url. The example here is…
Evil Spork
  • 173
  • 1
  • 6
7
votes
1 answer

How do I launch Pidgin when I click on an irc:// link?

Is there a way that when you click an IRC url (such as irc://##linux) that it will open Pidgin? I believe it has something to do with gconf-editor, but I do not know the terminal command to start an IRC chat in Pidgin. I am using Linux Mint, if…
Chris
  • 71
  • 1
7
votes
4 answers

Extracting substring from environment variable

In a bash or zsh script, how might I extract the host from a url, e.g. unix.stackexchange.com from http://unix.stackexchange.com/questions/ask, if the latter is in an environment variable?
Toothrot
  • 3,255
  • 3
  • 24
  • 47
6
votes
1 answer

How can I enable URL rewriting on a DD-WRT router?

I would like to be able to add a parameter to certain URL requests that go through my DD-WRT router. Specifically, I'm trying to figure out how to force safe search in Google, which means I have to append safe=on to any URL requests that begin with…
Big McLargeHuge
  • 3,044
  • 11
  • 35
  • 49
1
2 3
9 10