The primary purpose of /sbin is system recovery. Of course it is used by the "superuser".
Following that sense /usr/sbin was created with further "superuser" tools (dynamically linked).
BTW Solaris 11 has
And all Solaris have Now even RHEL 7 joins in - what a relief!
The /bin /usr/bin /sbin /usr/sbin "quadriga" is quite common in Unix,
Portable shell scripts should start with
and then use simple commands.
I have seen a thousand scripts that have adventurous workarounds (e.g. manually trying each command with various pathnames, storing them in variables or even in arrays - disgusting!).
This User Gave Thanks to MadeInGermany For This Post:
This code has worked for years and still does in my production environment. But it's failing in my development environment now. The cd works but the creation of node1, jnum, and node2 fails. Oddly the output shows a line from from the awk script at the end of the code during the setting of each... (6 Replies)
Bourne: How to invoke an alias from within a shell script
If I type in the alias in the command line, it runs
If I insert that same alias into my shell script and run the shell script, the alias is not invoked.
Help please. (2 Replies)
Hi All,
PF below details,
> cat run.sh
#!/usr/bin/ksh
alias ll="ls -l"
> ./run.sh
> ll
ksh: ll: not found.
Pls help on this?
Thanks in Advance,
Naga :cool: (2 Replies)
Hello, I am trying to set an alias in my .kshrc or .profile and when I do it is not setting. If I do it manually it works fine. Is there another file I should put this in? Here is the alias I am using.
alias ll='ls -ltr'
I am using solaris 9. When I type alias it does not show these... (5 Replies)
Hi
My Unix sever is AIX 5.3. My Login shell ( using echo $SHELL) is /bin/sh implying it is a Bourne Shell. My Question is that i am still able to use Alias command to create/retrieve aliases. I have read in several sites on Unix online that the Bourne Shell does not support Aliases but... (12 Replies)
Iam facing some strange issue with alias. I have an alias file in which i have created lot of aliases as given below.
export BUILD_HOME=/apps/psr/build
export DB_HOME=/apps/psr/database
export LOGS_HOME=/apps/psr/logs
export BUILD_TEST=/apps/psr/build_dev/build_test
export... (0 Replies)
Hi,
I'm on Solaris (SunOS wsp2cm01 5.10 Generic_150400-10 sun4v sparc SUNW,Sun-Fire-T200). Trying to set up an alias like below -
alias grep="/usr/xpg4/bin/grep"but when I call grep in my command it ignores my alias & uses /usr/bin/grep instead. The problem with /usr/bin/grep is that it doesn't... (24 Replies)
I have several shell scripts which contain the nawk command.
Here is what i m doing assign the correct value to nawk as nawk is not found on a new systems.
Here is what i did.
more test.sh
] && alias nawk=/usr/bin/gawk
] && alias nawk=/usr/bin/nawk
] && alias nawk=/usr/bin/awk... (7 Replies)
I have a loop with cases
I am working on Bourne shell
for file in *.${Today}*.csv *.${Today}*.txt\
do
case ${file} in
sun_detail)
do something
;;
sum)
do something
;;
mod)
do something
;;
*)
do something
;; (5 Replies)
Hi,
I have the following aliases:
$: alias | grep "^du="
du='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn'
$: alias | grep "^dutop10="
dutop10='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn | head... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT LINUX
debpkg
DEBPKG(1) General Commands Manual DEBPKG(1)NAME
debpkg - wrapper for dpkg
SYNOPSIS
debpkg dpkg-options
DESCRIPTION
debpkg simply invokes dpkg(1) but first becomes superuser so that dpkg is able to install and remove packages. It also cleans the environ-
ment and resets PATH to a sane default: "/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11" so that local versions of programs are not run by
accident.
REQUIREMENTS
debpkg must be given superuser privileges in some way to function properly. Access to debpkg with those privileges is the same as having
superuser access to your machine. debpkg will abort if it finds that it neither being run by root nor setuid root.
The devscripts package has been designed to allow debpkg to be made setuid root. This works by using a compiled wrapper script, which
means that suidperl is not required. See dpkg-statoverride(8) if you wish to make this program setuid root. sudo or super could also con-
ceivably be used.
AUTHOR
Christoph Lameter <clameter@debian.org>; minor modifications made by Julian Gilbey <jdg@debian.org>.
DEBIAN Debian Utilities DEBPKG(1)