• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: tutorial on HFS versus finder and POSIX file path ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: tutorial on HFS versus finder and POSIX file path ?
      • From: "Mark J. Reed" <email@hidden>
    • Re: tutorial on HFS versus finder and POSIX file path ?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >tutorial on HFS versus finder and POSIX file path ? (From: Yvon Thoraval <email@hidden>)
 >Re: tutorial on HFS versus finder and POSIX file path ? (From: "Mark J. Reed" <email@hidden>)
 >Re: tutorial on HFS versus finder and POSIX file path ? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: TextEdit find/replace script
  • Next by Date: Re: tutorial on HFS versus finder and POSIX file path ?
  • Previous by thread: Re: tutorial on HFS versus finder and POSIX file path ?
  • Next by thread: Re: tutorial on HFS versus finder and POSIX file path ?
  • Index(es):
    • Date
    • Thread