Recent Articles

Linux Tail Command Options With Examples

The linux tail command does something like its name. It displays the last few lines of a file. It is mostly used for viewing log file updates as these updates are appended to the log files. This article explains tail command with most common options. Tail Command Options The tail command accepts input from STDIN. […]

July 1, 2013 | By
| 1 Reply More

Linux Process And Directory Structure Tree Commands

Linux provides us with a number of small utilities for system monitoring and logging. These small tools are very helpful for a system administrator. The Unix ‘ls’ and ‘ps’ commands are very useful for listing directories and processes. But if we want the output in tree-like structure, we have tree and pstree commands. This article […]

June 24, 2013 | By
| Reply More

Linux du Command All Options To Study

The linux disk usage command, du estimates the disk space used by files and (recursively for) directories. What files and folders are consuming how much disk space is reported by this command. In this article, we explore options to this useful command. du command and options 1. Default Behavior By default, without any option, it […]

June 20, 2013 | By
| Reply More

Linux Shell Script To Delete Empty Directories

Linux shell script that search for empty directories and delete them. If system administrator don't want to keep empty directories, this script can quickly remove all of them. You can input the path where you need to search for empty directories. Script will confirm before it deletes the empty directory. Linux Shell Script #!/bin/bash #Check […]

June 17, 2013 | By

Linux Shell Script To Find Kernel Version From Multiple Servers

Linux shell script that will login to server via ssh and get kernel version via uname -r command. List of all the servers are in server_list.txt file, script will take name by name and try to ssh with the root user and run uname -r command. Output will be written to variable and after into […]

June 13, 2013 | By
| Reply More

Linux Shell Script: Find Memory Usage Of An Application/Program In Linux is a shell script that calculates linux memory usage for each program / application. Script outputs shared and private memory for each program running in linux. Since memory calculation is bit complex, this shell script tries best to find more accurate results. Script use 2 files ie /proc//status (to get name of process) and […]

June 5, 2013 | By
| 1 Reply More

Linux - Finger Command To Find User Details

On Linux operating system, you can simply check the information of any user from remote or local command line interface. That is ‘finger’ command. To use this command, your Linux machine need have ‘finger’ utility installed on it. This feature is a very basic with Linux system, so you can easily find install package proper […]

May 29, 2013 | By
| Reply More

Shell Script To Check File Exists Under A Path

This Shell script helps to check if the specified file exits under a given path. Script prompt you to provide file name and directory path. Shell Script #!/bin/bash #We tell user that he need to enter filename echo -n "Please enter file to check: " #We write filename to variable file read file #We tell […]

May 26, 2013 | By
| Reply More

Shell Script To Run Commands In Users Home Directory

Shell script that run linux commands in all users home directories and outputs its results. Scripts accepts user name and command as the argument. Shell Script #Next line tell with shell to use #!/bin/bash #we store in variable path to file UserListFile=/tmp/user.list #We create function with name Usage Usage () { #printing help echo "$0 […]

May 22, 2013 | By
| Reply More

Linux Shell Script To Delete Duplicate Files

Shell Script is looking for duplicated names in files withing sub-directories, and after check md5sum. If md5sum of the files same then we conclude its duplicated. This helps system administrator to delete unnecessary copy to reduce used space. Script also ask user to enter directory where to search, and check if input is empty. Linux […]

May 19, 2013 | By
| 2 Replies More

Shell Script To Find Directories Which Consume Highest Space

Shell script to show X number of directories that consume space in a path. This script useful if user need quickly to clean up space, so first user need to check what directory take most of space and the delete according to your wish. Commands used are du with different keys , then sort and […]

May 16, 2013 | By
| Reply More

Linux Shell Script To Collect Linux System Information

Shell script that take info about linux system like logged users, uptime, load average, free memory, disk usage. Script helps to see all info about system in a second. Administrator can modify the script bit ,if it requires to find system information from multiple server. Script run commands w, uname, uptime, free and df. From […]

May 12, 2013 | By
| Reply More

How To Create or Display Hidden Files / Folders in Linux

Here we will discuss how to create and display hidden files and folders in linux/Unix Operating Systems. Mostly our favorite 'ls' command doesn't display hidden files or folders in linux. If any file's name starts from '.' prefix (for ex: .test) then that will call as hidden file and 'ls' or 'll' command will not […]

May 7, 2013 | By
| Reply More

Chattr Command or Change Attributes of File

Attributes of file or extend attributes of file are simple and easy to use.  Chattr command uses to change file attributes on a Linux in ext2 or ext3 file system.  After changing attributes no one can modify or delete a file even they have full access. Chattr keep safe from accidentally deleting files or directories. […]

May 5, 2013 | By
| Reply More