Tilde In File Names: What Function?

Discussion in 'HTML' started by (Pete Cresswell), Dec 10, 2004.

  1. In file and directory names associated with web pages, I often see a tilde as
    the first character.

    I'm guessing this servs some useful function, but what?

    e.g. http://www.armory.com/~images/
    --
    PeteCresswell
    (Pete Cresswell), Dec 10, 2004
    #1
    1. Advertising

  2. (Pete Cresswell)

    Spartanicus Guest

    "(Pete Cresswell)" <> wrote:

    >In file and directory names associated with web pages, I often see a tilde as
    >the first character.
    >
    >I'm guessing this servs some useful function, but what?
    >
    >e.g. http://www.armory.com/~images/


    ISPs using an Apache web server typically provide webspace to their
    users in that form, for example http://www.isp.com/~username

    --
    Spartanicus
    Spartanicus, Dec 10, 2004
    #2
    1. Advertising

  3. (Pete Cresswell) wrote:
    > In file and directory names associated with web pages, I often see a tilde as
    > the first character.
    >
    > I'm guessing this servs some useful function, but what?
    >
    > e.g. http://www.armory.com/~images/


    It serves the purpose of being a tilde; there's no special meaning
    assigned by URI specifications. Many Web servers use it to refer to a
    particular user's Web site, but again, that's not defined in any standard.

    Jukka K. Korpela has an interesting article on why tildes shouldn't be
    used in Web addresses; see <URL:http://www.cs.tut.fi/~jkorpela/tilde.html>.
    Leif K-Brooks, Dec 10, 2004
    #3
  4. (Pete Cresswell)

    Neal Guest

    Leif K-Brooks:

    > Jukka K. Korpela has an interesting article on why tildes shouldn't be
    > used in Web addresses; see
    > <URL:http://www.cs.tut.fi/~jkorpela/tilde.html>.


    Irony, isn't it beautiful?? Ought you to have typed:

    <http://www.cs.tut.fi/%7Ejkorpela/tilde.html>

    ?
    Neal, Dec 10, 2004
    #4
  5. (Pete Cresswell)

    Richard Guest

    (Pete Cresswell) wrote:

    > In file and directory names associated with web pages, I often see a
    > tilde as the first character.


    > I'm guessing this servs some useful function, but what?


    > e.g. http://www.armory.com/~images/
    > --
    > PeteCresswell



    One definition I read said, "There is a directory by this name somewhere,
    find it.".
    IMHO I believe it's used by people who do not understand how things work.
    Or...it is understood fully and used in various ways.

    I asked a host if I could set up a directory using the IP instead of my
    domain name.
    They said sure, just acess it as 127.000.000.001/~myfiles.

    My news service, newsguy, allows users to setup pseudo websites and the
    acess method is with newsguy.co/~membersite.

    This may also help to denote a difference between /~images and /images where
    the latter is a directory of the main website.
    Richard, Dec 10, 2004
    #5
  6. (Pete Cresswell)

    Richard Guest

    Neal wrote:

    > Leif K-Brooks:


    >> Jukka K. Korpela has an interesting article on why tildes shouldn't be
    >> used in Web addresses; see
    >> <URL:http://www.cs.tut.fi/~jkorpela/tilde.html>.


    > Irony, isn't it beautiful?? Ought you to have typed:


    > <http://www.cs.tut.fi/%7Ejkorpela/tilde.html>


    > ?



    Who the sam hell is gonna remember "%7e" anyways?
    And like how often is it used?
    Richard, Dec 10, 2004
    #6
  7. (Pete Cresswell)

    Dylan Parry Guest

    (Pete Cresswell) wrote:
    [Tilde in URL]
    > I'm guessing this servs some useful function, but what?


    Generally, if using Apache, then the tilde refers to a Website that is
    located within the public_html directory for the user references after
    the tilde, eg. http://mysite.com/~dylan would be for the user named
    "dylan" and would have the files located in "/home/dylan/public_html" --
    this way, large organisations such as Universities can have Websites
    served for everyone with a login.

    Of course, this is just /typical/ and might not be exactly the same with
    all setups.

    --
    Dylan Parry
    http://webpageworkshop.co.uk -- FREE Web tutorials and references
    Dylan Parry, Dec 11, 2004
    #7
  8. (Pete Cresswell)

    Guest

    On Fri, 10 Dec 2004 16:11:24 GMT, "(Pete Cresswell)" <> wrote:

    >In file and directory names associated with web pages, I often see a tilde as
    >the first character.
    >
    >I'm guessing this servs some useful function, but what?
    >
    >e.g. http://www.armory.com/~images/


    Tilde in unix speak refers to the home directory. So I'm guessing that
    whenever you see the tilde in a URL, it's running the web server on a
    unix box and the files are located under the users directory rather
    than some other directory.

    --
    Erik
    , Dec 11, 2004
    #8
  9. (Pete Cresswell)

    Richard Guest

    wrote:

    > On Fri, 10 Dec 2004 16:11:24 GMT, "(Pete Cresswell)" <> wrote:


    >>In file and directory names associated with web pages, I often see a
    >>tilde as the first character. I'm guessing this servs some useful

    > function, but what? e.g. http://www.armory.com/~images/


    > Tilde in unix speak refers to the home directory. So I'm guessing that
    > whenever you see the tilde in a URL, it's running the web server on a
    > unix box and the files are located under the users directory rather
    > than some other directory.


    When I had asked my host of this, that's how they said to access the files.
    domain.com/~files.
    Problem is, I thought at first I could use any name I wanted, but got
    roadblocked because "already in use" kept popping up. Why?
    I finally figured out that it wasn't because it was only for me, but for
    others who were also hosted on the same IP.
    So it may be it is a public directory thing rather than a directory listing
    within a particular domain.
    Richard, Dec 11, 2004
    #9
  10. (Pete Cresswell)

    Toby Inkster Guest

    Toby Inkster, Dec 11, 2004
    #10
  11. (Pete Cresswell)

    Spartanicus Guest

    Toby Inkster <> wrote:

    >> ISPs using an Apache web server typically provide webspace to their
    >> users in that form, for example http://www.isp.com/~username

    >
    >Furthermore tildes in file names by convention refer to backup copies.
    >
    >e.g. http://www.example.org/robots.txt~ is a backup copy of
    >http://www.example.org/robots.txt


    Surely that needs to be qualified to include the OSs it applies to,
    afaik it applies to nix based OSs only.

    Apache would probably more often be run on nix platforms, but it is
    available for Win32 also, and since version 2 it allegedly runs reliable
    on NT+ Win OSs.

    --
    Spartanicus
    Spartanicus, Dec 11, 2004
    #11
  12. Spartanicus wrote:
    > Toby Inkster <> wrote:
    >
    >>Furthermore tildes in file names by convention refer to backup copies.

    >
    > Surely that needs to be qualified to include the OSs it applies to,
    > afaik it applies to nix based OSs only.


    It's just a convention, not an OS or Apache feature. I suppose it is
    used more heavily in the Unix world, but e.g. the Windows version of Vim
    does it too.
    Leif K-Brooks, Dec 11, 2004
    #12
  13. (Pete Cresswell)

    Guest

    On Fri, 10 Dec 2004 22:44:47 -0600, "Richard" <Anonymous@127.001>
    wrote:

    > > Tilde in unix speak refers to the home directory. So I'm guessing that
    > > whenever you see the tilde in a URL, it's running the web server on a
    > > unix box and the files are located under the users directory rather
    > > than some other directory.

    >
    >When I had asked my host of this, that's how they said to access the files.
    >domain.com/~files.
    >Problem is, I thought at first I could use any name I wanted, but got
    >roadblocked because "already in use" kept popping up. Why?
    >I finally figured out that it wasn't because it was only for me, but for
    >others who were also hosted on the same IP.
    >So it may be it is a public directory thing rather than a directory listing
    >within a particular domain.


    Richard, Can you please change your quote character to just the single
    character of "greater-than"? By using "space greater-than" as your
    quoting character, my newsreader doesn't highlight the quoted text
    properly.

    My home directory at work is /home/erikd so if I want to copy a file
    to my home directory I can use /home/erikd or just ~. Since tilde is
    alias for the home directory structure, if I want to copy a file from
    kevinj's home directory, I can use /home/kevinj/file or ~kevinj/file.
    So rather than using ~ which needs interpretation, try finding out
    what the full path is and use that.

    --
    Erik
    , Dec 12, 2004
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SStory

    Tilde for relative path

    SStory, Oct 16, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,736
    SStory
    Oct 19, 2003
  2. CHristian Niss
    Replies:
    0
    Views:
    470
    CHristian Niss
    Oct 31, 2003
  3. monte
    Replies:
    3
    Views:
    1,202
    Mike Smith
    Sep 23, 2004
  4. Ares Lagae
    Replies:
    8
    Views:
    446
    Ares Lagae
    Sep 24, 2004
  5. News123
    Replies:
    2
    Views:
    463
    John Machin
    Nov 26, 2008
Loading...

Share This Page