🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #623819

Re: First use of /sbin in Unix?

#623819
From: Grant Taylor
Date: Thu, 07 Jun 2018 18:40
58 lines
4194 bytes
On 06/07/2018 06:18 AM, Jorgen Grahn wrote:
> seems to me overriding a standard utility would almost always be the 
> wrong solution to a problem.

Maybe, maybe not.

Keep in mind, I'm only superseding / augmenting system commands that I 
want to run differently than they do by default.

I have ~/bin first in my path.  I have a number of utilities that 
require root permission (gained via sudo) that I run ALL THE TIME (as in 
daily, some many times a day).

So I have a wrapper [1] that I put in ~/bin for things like ip, netstat, 
ifconfig, route, etc so that I can type commands into my unprivileged 
user's shell exactly the same way that I would type them in root's shell.

I don't have to worry about needing to prefix commands with sudo (et al) 
or not.
I don't have to worry about using different formats of commands in 
different contexts.
I don't have to worry about escaping special characters to make it 
through sudo.
Etc.

I personally consider removing all the above mental load and making the 
computer do what I want to be a good thing.  Thus I consider it to be 
the proper solution.

There is also the fact that I have a LOT of commands in ~/bin that don't 
exist anywhere else that I use hourly (while at the computer).  So 
having them in a directory that is last in the PATH means that the shell 
has to traverse more directories to find them.

Aside:  I use a lot of extremely small shell scripts instead of aliases 
because I want to also be able to use the same shell scripts from within 
other locations where aliases don't apply, like non-interactive ssh 
remote command execution or other shell scripts.

What if I want a specific version of a command later in the PATH 
priority that gets superseded by a different version that is earlier in 
the PATH priority?  Having ~/bin first in the PATH allows me to make a 
sym-link to the version that I want.  Thus the version that I want is 
found and supersedes the version I want to avoid.

Finally, remember that we're talking about a user's PATH, not the system 
wide PATH.  Which means (to me) that it's up to the given user to 
configure things the way that they want.  Far be it for me to tell you 
what you should and should not do.

[1] Link - Sudify
      - https://dotfiles.tnetconsulting.net/tools/sudify/sudify.html



-- 
Grant. . . .
unix || die
Technical Details
Message-ID: <pfbuep$lb$1@tncsrv09.home.tnetconsulting.net>
Path: mbox-mo1.pugleaf.net!f20-v6ni3667itd.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED!not-for-mail
References: <pf6emc$3h2$1@dont-email.me> <ZzzRC.190248$T14.113297@fx44.iad> <pf7ieq$40p$1@tncsrv09.home.tnetconsulting.net> <20180606103538.7eddd3774f5429f1abd54fc6@eircom.net> <XnsA8F990C4CB379admin127001@85.214.115.223> <pf8vvb$oko$1@tncsrv09.home.tnetconsulting.net> <slrnphgdv7.31ka.grahn+nntp@frailea.sa.invalid> <sfXRC.288871$yc1.96733@fx40.iad> <slrnphi8k3.31ka.grahn+nntp@frailea.sa.invalid>

Show Full Headers
Complete Article Headers
X-Received: by 2002:a24:3f4c:: with SMTP id d73-v6mr1621454ita.30.1528396802280;        Thu, 07 Jun 2018 11:40:02 -0700 (PDT)
X-BeenThere: alt.folklore.computers@googlegroups.com
Received: by 2002:a24:5a04:: with SMTP id v4-v6ls510028ita.0.gmail; Thu, 07 Jun 2018 11:40:01 -0700 (PDT)
X-Received: by 2002:a24:ca01:: with SMTP id k1-v6mr1563850itg.40.1528396801509;        Thu, 07 Jun 2018 11:40:01 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!f20-v6ni3667itd.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED!not-for-mail
From: Grant Taylor <gta...@tnetconsulting.net>
Newsgroups: alt.folklore.computers
Subject: Re: First use of /sbin in Unix?
Date: Thu, 7 Jun 2018 12:40:56 -0600
Organization: TNet Consulting
Lines: 58
Message-ID: <pfbuep$lb$1@tncsrv09.home.tnetconsulting.net>
References: <pf6emc$3h2$1@dont-email.me> <ZzzRC.190248$T14.113297@fx44.iad> <pf7ieq$40p$1@tncsrv09.home.tnetconsulting.net> <20180606103538.7eddd3774f5429f1abd54fc6@eircom.net> <XnsA8F990C4CB379admin127001@85.214.115.223> <pf8vvb$oko$1@tncsrv09.home.tnetconsulting.net> <slrnphgdv7.31ka.grahn+nntp@frailea.sa.invalid> <sfXRC.288871$yc1.96733@fx40.iad> <slrnphi8k3.31ka.grahn+nntp@frailea.sa.invalid>
NNTP-Posting-Host: alpha.home.tnetconsulting.net
Mime-Version: 1.0
X-Trace: tncsrv09.home.tnetconsulting.net 1528397081 683 198.18.18.251 (7 Jun 2018 18:44:41 GMT)
X-Complaints-To: newsm...@tnetconsulting.net
NNTP-Posting-Date: Thu, 7 Jun 2018 18:44:41 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
In-Reply-To: <slrnphi8k3.31ka.grahn+nntp@frailea.sa.invalid>
Bytes: 3851
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit