≡ Menu

ln command

Ubuntu / Debian Linux: Install gcutil Tool To Manage Google Compute Engine

How do I install and use gcutil - a command-line tool that is used to manage Google Compute Engine resources under Debian or Ubuntu or CentOS/Fedora Linux desktop operating systems?
[click to continue…]

Bash Script: Find Out In What Directory Script Is Stored Under Unix Or Linux

How can I find out the path of the directory in which my bash shell script is located and store that path in _base variable?
[click to continue…]

I am login to a remote server using a ssh client. I am annoyed with the arrow key behavior during insert mode in Vim. As soon as I hit arrow keys, vim display A B C D on screen. How do I fix this problem under Linux, FreeBSD, OpenBSD, NetBSD, Apple OS X or Unix-like operating systems? How can I fix arrow keys that display A B C D on remote shell?
[click to continue…]

resolvconf: Error: /etc/resolv.conf must be a symlink Error and Solution

When I try to restart my BIND 9 server under Ubuntu Linux using service bind9 restart or service bind9 start command, I get the following error:
resolvconf: Error: /etc/resolv.conf must be a symlink

How do I fix this problem?
[click to continue…]

HowTo: Make a Symbolic Link To /bin Directory

How to make a symbolic link to /bin in /nas/users/foo directory?
[click to continue…]

I see the following error in my SELinux enabled CentOS or RHEL server:

Jun 21 13:58:43 server3 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
Jun 21 16:14:51 server3 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
Jun 22 13:32:23 server3 restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory

How do I fix this problem?
[click to continue…]

Access Any Remote Server Port Without Modifying Firewall Settings

Q. I've couple of remote servers and I'd like to access few admin only application running on port 10000 and 3001. My firewall only allows port 80, 443, 25, 22 and 110 for public access. Do I need to open port 10000 and 3001 for everyone using firewall? How do I access my admin only apps without opening port 10000 and 3001?
[click to continue…]

Unix Create a Symbolic Link

How do I create a symbolic links under Linux or Unix like operating systems using command line options?
[click to continue…]

Linux / UNIX: Clear bash history

Q. I'm using CentOS Linux server and how do I clear bash history in UNIX / Linux / BSD operating systems?

A. Type the following command to clear your bash history:

>~/.bash_history

Another option is link ~/.bash_history to /dev/null:
ln -sf /dev/null ~/.bash_history

HowTo: Create a Hard Links in Linux / UNIX

Both Linux / UNIX allows the data of a file to have more than one name in separate places in the same file system. Such a file with more than one name for the same data is called a hard-linked file. How do I create a hard link under Linux / UNIX / Apple Mac OS X / BSD operating systems?
[click to continue…]