Background And Foreground Commands , fg bg
The other day I was sitting in on a presentation by a co-worker. He was running a job that usually takes a while and and used the bg and fg commands. I was familiar with these commands but have not used them in a while. Needless to say if you need a refresher or just […]
Redirect Standard In and Out
Redirect command output to /dev/null # my_cmd > /dev/null 2>&1 Redirect all of the output for an entire script. Add the following to the top of the line. exec > /tmp/output 2>&1 # to redirect both in same file exec > /tmp/output 2>/tmp/error # to redirect in different files Need to redirect to a logfile […]
HPUX swinstall Cannot establish a lock on this target because of an external error
After your register your depot: # swreg -l depot /dir/to/my/depot And you try to install install you get the error in /var/adm/sw/swinstall.log or as std out: ERROR: “my_host:/dir/to/my/depot”: Cannot establish a lock on this target because of an external error (for example, the lock file could not be created). Try this: # cd /dir/to/my/depot/catalog # […]
Solaris Boot Failures
error on boot: devfsadm: mkdir failed for /dev 0x1ed: Read-only file system I usually see this error when there is a meta device issue or after breaking a sub-mirror. From the OK prompt boot into failsafe mode. {ok} boot -F failsafe Mount a disk to /a , copy the md.conf file # mount -o ro […]
Manage Solaris Services SMF
Need to disable services. In this example inetd: # svcs -a | grep -i inet legacy_run 10:44:22 lrc:/etc/rc2_d/S72inetsvc disabled 10:43:57 svc:/network/inetd-upgrade:default online 10:44:18 svc:/network/inetd:default # svcadm disable svc:/network/inetd:default # svcs -a | grep -i inet legacy_run 10:44:22 lrc:/etc/rc2_d/S72inetsvc disabled 10:43:57 svc:/network/inetd-upgrade:default disabled 11:06:21 svc:/network/inetd:default # svcs -d inet # svcs -d inetd STATE STIME FMRI […]
convert uppercase to lowercase
Uppercase to lowercase using vi :%s/.*/\L&/ Lowercase to uppercase using vi :%s/.*/\U&/ Using tr ( depends on flavor ) tr ‘[:upper:]’ ‘[:lower:]’ < file > newfile
Linux Shutdown
The reason RedHat does not kick off your K* rc shutdown scripts is because RedHat checks for a lock file for your script in /var/lock/subsys/ To fix this, simply add a line to your ‘start’ section, something like this: Code: touch /var/lock/subsys/< scriptname > Scripts under rc0.d and rc6.d do not seem to run during […]
Administering Passwords (Solaris Naming Administration Guide)
Administering Passwords (Solaris Naming Administration Guide).
Creating Metadevices – (Using DiskSuite 4.2.1 Commands)
Creating Metadevices – (Using DiskSuite 4.2.1 Commands).
CommVault Forums – stop and start services on Unix (solaris 10)
If you are running simpana (OEM CommVault), then the commands are as follows: Stops services: # simpana stop Starts services # simpana start Bounces services… (stops then immediately restarts) # simpana restart Displays service status (Running has PID, stopped has N/A) # simpana list Displays installed environment # simpana status For Hitachi Data Systems replace […]