[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/profile should include sbin in PATH

>>>>> "Nathan" == Nathan E Norman <finn@midco.net> writes:

    Nathan> The question wasn't how to replace PATH, but how to remove
    Nathan> a value from it.  How do you do that without sed or perl?

Easy - use zsh!

[501] [snoopy:bam] ~ >echo ${path}
/homes/bam/bin/linux/i686 /homes/bam/bin/linux /homes/bam/bin /usr/local/bin /usr/bin/X11 /usr/bin /bin /usr/bin/mh /usr/games .
[502] [snoopy:bam] ~ >echo ${path:#/usr/games}
/homes/bam/bin/linux/i686 /homes/bam/bin/linux /homes/bam/bin /usr/local/bin /usr/bin/X11 /usr/bin /bin /usr/bin/mh .
[503] [snoopy:bam] ~ >path=${path:#/usr/games}
[504] [snoopy:bam] ~ >echo ${path}
/homes/bam/bin/linux/i686 /homes/bam/bin/linux /homes/bam/bin /usr/local/bin /usr/bin/X11 /usr/bin /bin /usr/bin/mh .

However, I am not sure I like the idea much of removing paths. Not
only is my method specific to zsh, but I think the people who are more
likely to want to use /sbin and /usr/sbin files are the same people
who are more likely to understand how to manually add it into their

I think of /sbin /usr/sbin commands as commands that you shouldn't
normally use unless you know what you are doing. Sure, you can't
break anything by misusing them (unless bugs exist), but they typically
deal with low level aspects of the hardware and/or system configuration
that most users don't need to access.

Just some comments specific to some programs in */sbin:

tcpdump: cannot be run as non-root (by default). I think other programs
exist in this catagory.

traceroute: at the bottom of the man page.

     This program is intended for use in network testing, measurement and man-
     agement.  It should be used primarily for manual fault isolation.  Be-
     cause of the load it could impose on the network, it is unwise to use
     traceroute during normal operations or from automated scripts.

ifconfig, route, etc: can be used by anyone, but the output is only
meant to be parsed by system administrator type people. These
people would also know how to set there path.
Brian May <bam@debian.org>

Reply to: