Archive for November, 2008
- TECHPULP |
Where my bash command history is stored
The bash shell stores all your command history in a file of your home directory. Typically it will be stored in ~/.bash_history. This is a global history of all bash terminals which are open. The bash shell appends all commands... - TECHPULP |
How to resolve “Device busy” error while unmounting a CD/DVD/Pen Drive
It is very annoying when Linux doesn’t allow you to unmount a CD or a USB flash disk saying “Device is busy”. In such cases, Linux doesn’t let you take out the CD by ejecting the drive. This typically happens... - TECHPULP |
How to change my Bash shell prompt
The environment variable “PS1” determines how the shell prompt should appear in Bash. You can find the current setting of PS1 as shown below. [neo@techpulp ~]# echo $PS1 [\u@\h \W]\$ [neo@techpulp ~]# Bash supports some pre-defined automatic variable substitutions in... - TECHPULP |
How to find list of user groups I belong to in Linux
The Linux command groups can be used to determine the list of groups a specific user belongs to. This should work in almost all flavors of Linux distributions. The following example shows how to use it. [neo@techpulp ~]# groups engineers... - TECHPULP |
How to find the available and free memory in my Linux system
The Linux system supports a special file system called PROC in which you can find various file describing the state of the current operating system. There is a file /proc/meminfo which contains information about the size of RAM currently installed... - TECHPULP |
Keyboard shortcuts/Hotkeys in Bash
Bash supports various hot keys to ease editing at bash shell prompt. The following are the commonly used shortcuts . Ctrl+A Move to the start of the current lin Ctrl+E Move to the end of the lin Ctrl+F Move forward... - TECHPULP |
Effective usage of TAB button in Bash shell
The Bash shell supports good number of intuitive ways of using TAB button on your keyboard to do command or file/directory name completions. Here is the list of TAB key usage combinations bash supports. Get lists all available commands (<TAB><TAB>)... - TECHPULP |
My telnet session doesn’t respond - How to close it and get the shell back
Sometimes the telnet session doesn’t respond and almost locks up your shell. This can be because of any of the following reasons. Your machine is disconnected from network Telnet Server is disconnected from the network Network problem between client and... - TECHPULP |
How to give muliple lines of input to a command in Bash
There are two ways of sending multi-lined input to a command. One method is to save all the input in a file and redirect it to the command as input. The other method is useful if your input is small... - TECHPULP |
Append redirected output of a command to a file in Bash
The bash command supports “>>” operator which can be used to append command output to a file instead of overwriting it. The following example appends output of two commands in a file. [neo@techpulp ~]# echo Hi, There > msg.txt [neo@techpulp...