0

The trash in Linux is shown under the path of trash:/// What does :/// mean?

I don't seem to be able to find the explanation of three slashes "///" anywhere online.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
Donbe_280385
  • 217
  • 1
  • 2
  • 7
  • Possibly related: [Nautilus special URIs](https://unix.stackexchange.com/questions/98562/nautilus-special-uris) – steeldriver Feb 10 '20 at 13:52
  • That's actually nothing to do with Linux. The operating system kernel does not know about this GVFS stuff. – JdeBP Feb 10 '20 at 13:53

1 Answers1

5

This is a Uniform Resource Identifier (URI), just as https://stackexchange.com is. A URI begins with the the scheme followed by :// literally and the authority. Since trash is the scheme of a virtual directory tree, its authority has a root directory called /. Here you are, the syntax is: scheme://authority, so it is trash:///.

For more information about URIs, see Wikipedia.

rexkogitans
  • 1,319
  • 11
  • 17
  • 1
    The `//` is part of the authority, not part of the separation between the scheme and the authority. Many file-like URLs, though, allow a "null" authority to represent the local host. Theoretically, one could write `trash://localhost/...` to differentiate between a file in the local trash can and a file in the trashcan of some other machine, or possibly even `trash://bob@/...` to represent some other user's trash can. Most likely, though, whichever window manager is processing the `trash` URLs is making up its own semantics without regard to how URIs are defined in general. – chepner Feb 10 '20 at 15:28
  • 1
    See, for example, the [description of the `file` scheme](https://en.wikipedia.org/wiki/File_URI_scheme). – chepner Feb 10 '20 at 15:31