4th Floor, 4 Tabernacle Street London EC2A 4LU

UNIX – Fork Explained

Mr. Peabody Explains fork() Introduction How Windows Does It How Unix Does It So Why Do People Want the Unix Way? How does it work in Perl? Introduction UNIX – Fork Explained Say, Mr Peabody. I was just reading through the Perl 5.6 release notes and noticed that a new function called fork() is now […]

UNIX Boot Mode – Run Levels

UNIX Boot Mode – Run Levels Runlevel “3” will boot to text or console mode and “5” will boot to the graphical login mode ( “4” for slackware) Runlevel Scripts Directory (Red Hat/Fedora Core) State 0 /etc/rc.d/rc0.d/ shutdown/halt system 1 /etc/rc.d/rc1.d/ Single user mode 2 /etc/rc.d/rc2.d/ Multiuser with no network services exported 3 /etc/rc.d/rc3.d/ Default […]

VNC server on Unix

VNC server on Unix Starting the VNC server on Unix for the First time VNC Server installs in /usr/local/bin, you need to make sure you have both /usr/local/bin and /usr/openwin/bin in your path, also the first time you run vnc you need to setup a vnc password, this is done with the /usr/local/bin/vncpassword command. After […]

change passwd – permission denied (NIS)

Change passwd – permission denied (NIS) I setup a new NIS server and put the NIS source files in /var/yp/src/ The command line “passwd” gave me a permission denied when changing an NIS user’s password. A restart of yp fixed the problem for me.. Eventually I restarted NIS with: [bash] /usr/lib/netsvc/yp/ypstop /usr/lib/netsvc/yp/ypstart [/bash]

Checking Memory on UNIX

Checking Memory on UNIX [bash]ps -A –sort -rss -o comm,pmem | head -n 11[/bash] [bash]ps -auxf | sort -nr -k 4 | head -10[/bash] [bash]free[/bash] [bash]free -m[/bash] [bash]ps aux | awk ‚Äò{sum +=$4}; END {print sum}‚Äô[/bash]

Search String in Directory – UNIX

Search String in Directory – UNIX How to search for a string in a selection of files (-exec grep …). [bash] find . -exec grep “searchstring” ‘{}’ \; -print [/bash] [bash] find . -exec grep “searchstring” ‘{}’ \; -ls [/bash] This command will search in the current directory and all sub directories. All files that […]

Copying a filesystem with Veritas

Copying a filesystem with Veritas This procedure is to create an exact copy of a Veritas filesystem. You will need enough spare disks in your volume group, and ideally anything using the filesystem should be killed. create a mirror # vxassist -g tier3dg mirror tier3fs # vxprint tier3fs Disk group: tier3dg TY NAME ASSOC KSTATE […]