Home / Server side scripting / Linux (page 4)

Linux

Shred command for overwriting a file

The operating system does not completely erase a file when the file is detected. The file could be recovered by third party forensic tools. But we can use the shred command to overwrite a file, to make it almost impossible for it to be recovered. The file is overwritten three …

Read More »

Low- level HDD formatting

You often have a hard disk drive that needs to be formatted such that all data in it gets destroyed. Here is a command that can erase all data from your HDD. #dd if=/dev/zero/of=/dev/had bs=1M This will formate your primary HDD(had) to a low level using dd. This will fill …

Read More »

Ten Open Source Backup and Recovery Tools

Hi all, Today i share one useful topic related to open source tools and their advantages. In the data center environment the open source tools have many advantages. First and foremost is their low cost and the flexibility they provide. Everyone will be aware of the source code so any …

Read More »

Search and replace text in Vim

Describe the basic fundamental uses of the text substitution inside the Vim editor. When you want a specific text(search) to be replaced with another text in the entire file, then you can use the following sequence: (1) Replace with information: :%s/search/replace/gc (2) Without Confirmation: :%s/search/replace/g (3) Replace only in the …

Read More »

Use the ‘Up’ arrow key to search through the bash command history

You can enable the ‘Up’ arrow of your keyboard to search through commands that you have used in the past, on the terminal. Just type the initial few letters of the desired command and press ‘Up’ arrow, and you will get the commands that start with the letters you have …

Read More »

Start programs or scripts at system bootup

The script /etc/rc.local is to be used by the systems administrator. It is executed after all the normal system services has been started. Administrators can use it to get the summary of the server(like memory status, hardware status, and others). The reports can be sent to personal mail ID. The …

Read More »

Find and remove duplicate file

It is a very common requirement to remove duplicate file. If you have a large collection of file, then finding and removing such duplicate file will be a tedious task. But this is where GNU/Linux makes the difference- it provides the ‘fdupes’ utility, which finds duplicate files by comparing their …

Read More »

How to switch between directories efficiently

Working on the Linux command line means switching between a lot of directories. Suppose you are in Directory ‘A’ and then move to Directory ‘B’. When you want to come back to Directory ‘A’, typing the complete directory path for ‘A’ can be cumbersome sometimes. Here’s a simple trick for …

Read More »

Mounting a remote file system with ssh.

Although running the scp or ssh command is very command is very convenient, mounting the remote servers filesystem on the local system has solved many problems for me. Here is how this can be done. To mount the remote filesystem to a local Linux workstation, you need to install the …

Read More »