How to change command prompt in FreeBSD

By default FreeBSD does not show anything in command prompt such as path, username, hostname except $. For many this can be quite annoying. As an example user does not know the current path and to get that must run pwd which is a redundant step. To have a more …

Renaming files in Linux terminal in batch

Few days ago I have encountered a problem whereby I had to rename 10,000 files and remove a prefix (_BK). There are two approaches to handle such a problem, Rename files manually from GUI. Using a small bash script to do the job. Here, I talk about second approach as …

Awesome Linux command line

To be honest with you, I like command line so much, even before I became familiar with Linux, I used to use DOS command prompt extensively, which in comparison with Linux command line is nothing. After, I had experienced Linux for the first time, I have fascinated how it is …

Running command under root user in bash script

Sometimes there are cases that required to run certain commands under root user in bash scripts. However, for switching the root, user must key in the root password. In such conditions the best approach is to utilize “sudo” command with -S parameter to be able to run a process under …