Path: csiph.com!xmission!news.alt.net!not-for-mail From: owl Newsgroups: comp.os.linux.advocacy Subject: Re: Statistics on 15.11.2015. Date: Wed, 18 Nov 2015 03:52:54 +0000 (UTC) Organization: O.W.L. Lines: 81 Message-ID: References: <20151115032729.48d032c5@maxa-pc> <50a916f4-f8df-4b7b-ad84-018cc928ed24@googlegroups.com> NNTP-Posting-Host: boom.rooftop.invalid User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.16.0-4-amd64 (x86_64)) Xref: csiph.com comp.os.linux.advocacy:333462 Snit wrote: > On 11/17/15, 8:27 PM, in article fheauf0.pa3@rooftop.invalid, "owl" > wrote: > >>>>>>>> Does it also amaze you that your home directory could be /home/snit, >>>>>>>> yet you could still have a file "home/snit" somewhere else on your >>>>>>>> system? Does it amaze you that "." or ".." can be part of a file >>>>>>>> or directory name? >>>>>>> >>>>>>> Er? I think you misread something. The question is simple: >>>>>>> >>>>>>> Do you think the tilde (~) in a path means "the hard drive >>>>>>> only"? >>>>>>> >>>>>>> I could have just said "no" but I gave a more complete answer. >>>>>> >>>>>> Why the exclamation here? >>>>>> >>>>>> "hint, the user's home folder... though you can also have it >>>>>> as a part of file or folder name if you want!" >>>>> >>>>> I am excited to give the morons of CSMA a hint... and still see them fail. >>>>> :) >>>>> >>>>> Hey, why don't you try to answer: >>>>> >>>>> Do you think the tilde (~) in a path means "the hard drive >>>>> only"? >>>>> >>>>> Again, no tricks here. >>>>> >>>> >>>> It means exactly what the shell's manpage says it means. >>>> >>> But you have no answer for it if means the hard drive only or something >>> else? >>> >> >> It's wherever you set it to be, which might be on a ramdisk. > > Seems you would agree it does not mean the hard drive only, nor is that even > the default... and anyone saying so would be showing they are technically > lost. > My shell is bash. Below is what the manpage has to say. It does not address mount points, and I don't see why they would be relevant. Tilde Expansion If a word begins with an unquoted tilde character (`~'), all of the characters preceding the first unquoted slash (or all characters, if there is no unquoted slash) are considered a tilde-prefix. If none of the characters in the tilde-prefix are quoted, the characters in the tilde-prefix following the tilde are treated as a possible login name. If this login name is the null string, the tilde is replaced with the value of the shell parameter HOME. If HOME is unset, the home direc??? tory of the user executing the shell is substituted instead. Other??? wise, the tilde-prefix is replaced with the home directory associated with the specified login name. If the tilde-prefix is a `~+', the value of the shell variable PWD replaces the tilde-prefix. If the tilde-prefix is a `~-', the value of the shell variable OLDPWD, if it is set, is substituted. If the char??? acters following the tilde in the tilde-prefix consist of a number N, optionally prefixed by a `+' or a `-', the tilde-prefix is replaced with the corresponding element from the directory stack, as it would be displayed by the dirs builtin invoked with the tilde-prefix as an argu??? ment. If the characters following the tilde in the tilde-prefix con??? sist of a number without a leading `+' or `-', `+' is assumed. If the login name is invalid, or the tilde expansion fails, the word is unchanged. Each variable assignment is checked for unquoted tilde-prefixes immedi??? ately following a : or the first =. In these cases, tilde expansion is also performed. Consequently, one may use filenames with tildes in assignments to PATH, MAILPATH, and CDPATH, and the shell assigns the expanded value.