Re: tutorial on HFS versus finder and POSIX file path ?
Re: tutorial on HFS versus finder and POSIX file path ?
- Subject: Re: tutorial on HFS versus finder and POSIX file path ?
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 17 Oct 2006 13:04:12 -0400
Yvan: sorry my reply wasn't helpful.
Michelle:
Isn't there also the one that starts with "~/" indicating a path from
home directory?
Only in certain contexts. The POSIX pathname spec doesn't have a
concept of a "home directory" outside of the shell, nor does it assign
any special meaning to the tilde character. Many shells, however, do,
and many other applications have adopted their conventions.
In bash, csh, ksh, zsh, etc, a lone ~ means "the value of the
environment variable $HOME"; $HOME is initialized to your home
directory when you start a login shell. Similarly, ~foo means "user
'foo's home directory as determined by looking them up in the passwd
database".
So, OMM, the HFS file:
Greyskull:Users:mreed:bin:scripts
is the same as the POSIX file:
/Users/mreed/bin/scripts
In a Terminal window, I can refer to that directory thus:
~/bin/scripts
as long as I'm me; if I'm logged in as someone else, then it's this:
~mreed/bin/scripts
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden