From owner-freebsd-questions Sat Jan 2 16:36:40 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA22920 for freebsd-questions-outgoing; Sat, 2 Jan 1999 16:36:40 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.240.222]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA22915 for ; Sat, 2 Jan 1999 16:36:39 -0800 (PST) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.9.1/8.9.1) id QAA28231; Sat, 2 Jan 1999 16:36:13 -0800 (PST) (envelope-from mph) Date: Sat, 2 Jan 1999 16:36:13 -0800 From: Matthew Hunt To: Chris Browning Cc: questions@FreeBSD.ORG, Chris Subject: Re: executable scripts Message-ID: <19990102163613.A28157@wopr.caltech.edu> References: <19990102144023.B18130@wopr.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: ; from Chris Browning on Sat, Jan 02, 1999 at 07:26:30PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jan 02, 1999 at 07:26:30PM -0500, Chris Browning wrote: > So to answer my own dumb question... I should put the script in /usr/bin or > some other directory on the path? I don't really care what directory it's in, > that was just the directory I happened to be working from. Maybe the AIX box had > . in the path. Sounds like a bad idea to me. A couple of possibilities: a) It doesn't need to be in a directory on the $PATH; you can explicitly type the path, as in: ./foo b) If it's for your own personal use, I suggest making a ~/bin directory, and adding that to your $PATH. Then you can put any of your personal scripts or programs there, and they won't bother anyone else. c) If the script is useful for all of your users, put it in /usr/local/bin (and make sure that's on your $PATH). Software that install usually should go in /usr/local. d) Only put things in /usr/bin if you have a darned good reason. It's there for stuff maintained by the FreeBSD developers, and should be approximately the same on everyone's FreeBSD system. /usr/local is for stuff that you add. If you read "man hier" you'll get a more thorough discussion of what goes where. If you're new to Unix, and setting up a FreeBSD system for your own personal use, you may not see much difference between (b) and (c) since you're the only user on your machine. But it's a good habit to get into to think about whether your changes are to suit yourself, or (hypothetically) all of your users. That can help you to decide whether to put software and scripts in ~/bin or /usr/local/bin, whether to change configuration files in /etc/foorc or ~/.foorc, and so forth. It's a good habit to get into early, even if it makes little practical difference. Matt -- Matthew Hunt * Stay close to the Vorlon. http://www.pobox.com/~mph/pgp.key for PGP public key 0x67203349. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message