Unix / Linux : How to print duplicate lines from file
|

Unix / Linux : How to print duplicate lines from file

In this post I am sharing a small tip which is very useful while for system admins. The tip is about how to print duplicate lines from file. Sometimes we get the big file with lot of contents.And there may be chances of duplicate lines. To find the duplicate lines from file, use the below…

Allow only members of Wheel group to use su command on RHEL/CentOS
|

Allow only members of Wheel group to use su command on RHEL/CentOS

In this tutorial we will learn,how to allow only members of Wheel group to use su command.Means only members of wheel group can switch to another user by using su command.As we know that in Red Hat based operating system, wheel group is a special administrative group. To allow only Wheel group’s member to use…

Print double hyphen sign simultaneously in post of Octopress
| |

Print double hyphen sign simultaneously in post of Octopress

After spending lot of time on this issue.I finally found the solution to print double hyphen sign simultaneously in post of Octopress.Octopress uses markdown as a default text editor.In recent time,Octopress come up as a promising bloging platform.I was working on my staging blog which is based on Octopress. While writing the post in Octopress,I…

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
|

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory While working on setting new squid transparent proxy in network.I faced an unusual error while restarting the Squid service. The getcwd() function copies an absolute pathname of the current working directory to the array pointed to by buf, which is…

fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device
|

fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device

Today,while working in cloud server.I faced an issue.I was copying some files to s3bucket,which I have mounted by using s3fs package. One every copy command(i.e cp),I was getting error – fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device. The problem was not new for me.I have seen this problem earlier also.The problem…

How to backup and restore iptables on Linux systems
|

How to backup and restore iptables on Linux systems

In this post we will learn, how to backup and restore iptables on Linux systems .As a Linux System Administrator,it is important to understand iptables. With iptables,you can secure the Linux Operating System.In this post,we have written a quick way to take backup and restore the iptables in Linux systems. iptables is a user space…

Replace keyword with its filename without extension : bash script

Replace keyword with its filename without extension : bash script

Today in this example we will use bash script. The task is replace keyword with its filename without extension.To accomplish this task we will use bash script.In bash script we will use for loop and sed command .To elaborate this example,lets assume we have 4 files called file1.txt red.txt blue.txt roger.txt The above each file…

Virtual Machine inaccessible status on VirtualBox 4.3
|

Virtual Machine inaccessible status on VirtualBox 4.3

Problem of the day : Virtual Machine inaccessible status on VirtualBox 4.3 . Today while working in VirtualBox 4.3 ,I got an issue.The Virtual Machine got the status “inaccessible” .After searching in VirtualBox related directories and commands,I finally able to resolve the issue.For resolving this issue,we will use command line.We have another option i.e by…

This kernel requires an x86-64 CPU but only detected an i686 CPU
|

This kernel requires an x86-64 CPU but only detected an i686 CPU

Error : This kernel requires an x86-64 CPU,but only detected an i686 CPU.Unable to boot – please use a kernel appropriate for your CPU . This error is commonly seen when you try to install a new Operating System in Virtual Box.The error occur mostly comes due to user mistake. Before going further ,first check…

Yum Error database disk image is malformed

Yum Error database disk image is malformed

In this post I am sharing, the troubleshooting step of the error which we found on using linux yum command.Error: database disk image is malformed, we found this problem running the command yum update To resolve this issue run the below given command yum clean dbcache If still issue persist,run below given command yum clean…

30 useful Linux terminal keyboard shortcuts
|

30 useful Linux terminal keyboard shortcuts

In this post we will know about 30 useful Linux terminal keyboard shortcuts.The Linux keyboard shortcuts make your work on terminal very easy.We have tried to gather some useful Linux terminal keyboard shortcuts which can be run in system terminal as well as accessing machine with ssh command(Means through ssh terminal in short). The given…

Password prompt in single user mode is not secure : CentOS/Red Hat
|

Password prompt in single user mode is not secure : CentOS/Red Hat

In this post I will discuss about, how a person still can log into Single User mode even if you have secure the single user mode.We can still login into system even if you are getting password prompt in single user mode / runlevel 1.The practical has been done in CentOS 6.x and Red Hat…

Install and optimize the png file by using optipng
|

Install and optimize the png file by using optipng

In this tutorial we will learn,how to install and optimize the png file by using optipng. Optimizing the png format file is very important, in terms of decreasing the website loading page time. If your website has a lots of png file,it may take time to load which also results in decreasing the webpage opening…