Web lists-archives.com

Chaos of confusion RESOLVED - was [Re: When specifying path to file - confused about ./ and ~/]

On 03/27/2017 06:14 AM, Richard Owlett wrote:

Please avoid trying to briefly explain.
Please refer me to a good web page.
I *KNOW* I'm missing something fundamental.

On Mon, Mar 27, 2017 at 11:25:30PM +1100, David wrote:


Sections 1.4, 1.6 part 2, and 2.1 demonstrate use of '.' and '~' to
represent directory names.

To the best of my knowledge, '.' is intrinsic to the filesystem

On 03/27/2017 07:47 AM, tomas@xxxxxxxxxx wrote:

Yes and no (see below)

[massive snip]

Of course, if you start your path with /, it's an absolute
path, like /usr/local/bin/foo/command.

That was the key.
*BUT* it went unrecognized until crashed full tilt into another problem.
My subject line SHOULD HAVE BEEN:
" When specifying path to file - confused about ./ and ~/ and /"
Particular examples would be the difference among
"ls ./" and "ls ~/" *AND* "ls /".

richard@march-9-Jessie:~$ cd testfolder
richard@march-9-Jessie:~/testfolder$ ls ~/
Documents	metime         Public         Videos
Downloads       Music          t1             wordpress_install
apr-3A          new file       Templates

richard@march-9-Jessie:~/testfolder$ ls ./
test-script-0   test-script-1

richard@march-9-Jessie:~/testfolder$ ls /
bin             dev            home           lib
media           boot           etc            initrd.img