‘shell’ topic list

Explained Awk1line and Sed1line

December 13th, 2009

If you have ever been interested in awk and sed Unix commands, then you probably know about the awk1line.txt and sed1line.txt files that are floating around the Internet. Each file contains around 80 idiomatic sed and awk one-liners for performing various text modification tasks. » Read more: Explained Awk1line and Sed1line

Avoid script running multiple times by file lock

October 22nd, 2009

Sometimes we need a single instance of a script to run at a time. Meaning, the script itself should detects whether any instances of himself are still running and act accordingly.

When multiple instances of one script running, it’s easy to cause problems. I’ve ever seen that about 350 instances of a status checking script running there without doing anything, but eat lots of system resource.
» Read more: Avoid script running multiple times by file lock

Find dead softlink files by shell

October 10th, 2009

Symbolic linked files are commonly used in Linux system. For example some service inital scripts are stored in /etc/init.d and linked to /etc/rc0.d, /etc/rc1.d, /etc/rc2.d, /etc/rc3.d, /etc/rc4.d, /etc/rc5.d and /etc/rc6.d, so that the system is able to control related services in different runlevel. » Read more: Find dead softlink files by shell

Difference between login shell and non-login shell

September 8th, 2009

Understanding the distinction between your shell types, profile files and shell rc files is important because when you apply modifications to your system you need to know where  to set variables in order to make sure that they can be initialized as expected. » Read more: Difference between login shell and non-login shell

SysAdmin Tips: Bash Shell Shortcuts

September 8th, 2009

Bash, which is the default shell in Linux contains a whole lot of key bindings which makes it really easy to use  The most commonly used shortcuts are listed below:
Original version of this post is here at blogspot.com.

» Read more: SysAdmin Tips: Bash Shell Shortcuts