How to prevent sed -i command overwriting my symlinks on Linux or Unix

I recently ran a command ‘sed -i  s/CONFIG_1/CONFIG_OPT_2/g  /etc/nginx/sites-enabled/*.conf‘ on a Debian Linux server. However, the sed command destroyed the link and created a regular file in place of the link file. How can I…

Ubuntu: /dev/xvda2 should be checked for errors

W hen I log in to my Ubuntu Linux 16.04 LTS AWS cloud server, I get the message on screen: /dev/xvda2 should be checked for errors. I can not run fsck command on /dev/xvda1 because…

Fix Host ‘IP’ is blocked because of many connection errors on MySQL/MariaDB

I am trying to login to my mysql/mysqld server using the following Unix command: $ mysql -u foo -h 172.16.5.100 -p dbnmame But greeted with the following error on screen: ERROR 1129 (HY000): Host ‘172.16.5.100’…

How to use/run bash aliases over ssh based session

I have set up a bash alias named file_repl. It works entirely when I log in using ssh command. However, my bash aliases are not running over ssh, for example: $ ssh vivek@server1.cyberciti.biz file_repl bash:…