0

Some time ago I found a code snippet that used curl (or similar) and instead of using a URL like http://example.com:2882 it accessed the site using a filesystem path. Something like:

curl /some/path/example.com/2882

How is this feature called?

I can't remember more details and all google results are misleading or unrelated.

arielnmz
  • 519
  • 1
  • 6
  • 23
  • `file://some/path/example.com/2882` (possibly with three `/` at the beginning rather than two) – roaima Jan 26 '23 at 21:19
  • Nope. What I do recall is that the path was an actual path in the filesystem. Like `/net/example.com/2882` I just don't remember what path preceded the hostanme (/net? proc/?) – arielnmz Jan 26 '23 at 21:36
  • nothing in the curl documentation suggests that syntax is a thing. curl always *do its best to use what you pass to it as a URL* - so `curl /net/example.com/2882` will result in curl trying something like `curl http://net/example.com/2882` - i.e. protocol `http`, host `net`, path `/example.com/2882` - and fail – Jaromanda X Jan 26 '23 at 22:02
  • Yes. That's what I wrote. Or for your latest example, `file:///net/example.com/2882`. It's a file URI and it references a file in the filesystem – roaima Jan 26 '23 at 22:03
  • 1
    Are you referencing `/dev/tcp/www.google.com/80` style path? - https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Redirections – raspi Jan 26 '23 at 22:34
  • @raspi yes! that kind of path, thank you. Is it called redirection just like that? or how is that special kind of tcp device/kernel feature called? – arielnmz Jan 31 '23 at 22:59

0 Answers0