Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Common usage of ls command in Linux

In Linux, ls might be one of the most frequently used commands. It is used to list files in a specific directory. In most cases, we may just use ls -l to list the files under a directory. But have you explored other usages of this command. In this post, we will summarise some other common usages of ls commandAssuming we have below directory structure in our system, let's see them using tree command.List details of the filesIf we want to list the details of the files in /home/alvin/test_dir, we can funls -lR /home/alvin/test_dir/Output:[alvin@VM_0_16_centos test_dir]$ ls -lR...

6,154 0       LS SHELL LINUX


  Server monitoring shell scripts

There are many open source server monitoring software such as cacti and nagios. Besides these, can we write our own shell scripts to monitor them? The shell scripts written by ourselves can fulfill our special requirements better and have a more detailed coverage.Below are some commonly used shell scripts used by Evangelist, an Oracle DBA. 1. Check network gateway traffic#!/bin/bash#network#Mike.Xuwhile : ; do time='date +%m"-"%d" "%k":"%M' day='date +%m"-"%d' rx_before='ifconfig eth0|sed -n "8"p|awk '{print $2}'|cut -c7-' tx_before='ifconfig eth0|sed -n "8"p|awk '{print $6...

46,077 2       MEMORY SHELL CPU SERVER MONITOR


  10 tools to make your shell script more powerful

Many people mistakenly think that shell scripts can only be run in command line. In fact shell can also call some GUI components such as menus,alert dialogs, progress bar etc. You can control the final output, cursor position and various output effects. Here we introduce some tools which can help you create powerful, interactive and user friendly Unix/Linux shell scripts.1. notify-sendThis command can let you inform the process to send a desktop notification to users. This can be used to send prompt to users or display some information to users. You can download it :$ sudo apt-get install libn...

6,970 0       GUI SHELL ZENITY


  Something you may not know about Shell

Shell is also called command line interface, it is the interface between *nix users and computer. Shell is a program which provides service to access OS kernel services.This article is to introduce some not so well known but useful and interesting knowledge about shell.Wikishell was born almost at the same time as Unix. The first UNIX shell was written by Ken Thompson in 1971 and its name is Thompson sh. It's older than Linux kernel.The default Shell in most *nix and MacOS is bash, bash was created by Brian Fox in 1987, the full name is Bourne Again shell(bash).There are other shells except ba...

5,019 0       LINUX COMMAND SHELL UNIX


  Bash Shell Scripting - 10 Seconds Guide

This Bash shell scripting guide is not a detailed study but a quick reference to the BASH syntax. So lets begin...Common environment variablesPATH - Sets the search path for any executable command. Similar to the PATH variable in MSDOS.HOME - Home directory of the user.MAIL - Contains the path to the location where mail addressed to the user is stored. IFS - Contains a string of characters which are used as word seperators in the command line. The string normally consists of the space, tab and the newline characters. To see them you will have to do an octal dump as follows:$ echo $IFS | od -b...

3,755 0       TUTORIAL LINUX SHELL BASH 10 SECONDS SHORTCUT KEY


  Useful Bash Scripts

Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It's possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts. Use set -u How often have you written a script that broke because a variable wasn't set? I know I have, many ti...

8,651 0       LINUX COMMAND SHELL BASH ROBUST