[ncolug] ~/bin

  • From: Chuck Stickelman <cstickelman@xxxxxxxxxx>
  • To: ncolug@xxxxxxxxxxxxx
  • Date: Sun, 16 Dec 2007 00:03:21 -0500

Ok, Mike B. has challenged me twice, and Rob has asked a couple of
questions... :)

~/bin in and of itself is not so bad.  If you have a single-user system
you can do anything you want without too much pain.

However, at some point in time you are likely administer a multi-user
system.  The possible scenarios are endless...

Now is the time to develop strong habits.  Habits that you can extend. 
This is part of the "*nix Way" Mike was talking about.

Here are a few hints that stand out:

    * Don't write a bunch of one-line scripts.  Most of the things that
      end up in those could be done w/ aliases, or some other
      mechanism.  NEVER, ever write a one-liner that calls another script.
    * Write your scripts to be generic.   Someone else on your system,
      or in your LUG, might want to use it.
    * Consider building a package to include your scripts and their
      configuration files.  Now things "live" in the proper place on
      your system.
    * If you're not going to package your work up, then store them in
      the appropriate subdirectories in /usr/local/.
    * If you are going to ~/bin, then NEVER, EVER put ~/bin in your
      $PATH!  NEVER. About the time you let someone write to your $HOME
      and they plop a piece of crap in YOUR ~/bin/ that just /happens/
      to have the same name as a system executable, you'll know why I
      say this.  It's common to allow others to write to your $HOME!  If
      you ignore my comments about $PATH, then don't set that up for
      everyone on your system!
    * Be very careful about how many directories have 0777 mode.
    * Learn how to effectively use groups.
    * Learn ACLs.
    * Learn to use the Command-line!

I'm sure there's more, but it's late.
Chuck

Other related posts:

  • » [ncolug] ~/bin