Zip is command in linux is used for compressing files and directory.In this post we will learn how to zip the directory or folder in linux. To compress directory use the below given format zip -r give-file-name.zip Directory-name example: root@tuxworld:/opt# ls -ld teamviewer8/ drwxr-xr-x 6 root root 4096 Oct 2 08:43 teamviewer8/ root@tuxworld:/opt# zip -r […]
Tips And Tricks
Do not show line haveing particular keyword by grep command
Do not show line haveing particular keyword by grep command Generally we use grep command to get the lines which has particular line in a file.There is one more option in grep by which you will not get the lines in output which has some specific keyword or keywords. To do not get lines in […]
How to hide php version information in header
While migrating from godaddy account to new server which is hosted in DigitalOcean,I checked the header by using command curl -I https://sharadchhetri.com . In output of command ,I found PHP version was given.For security point of view I want to hide or disable this information. For this you have to do small change in php.ini […]
Forward all incoming emails to other SMTP server or gateway
In this post we will learn how to forward all emails of particular domain to another SMTP server or gateway. I also used this method in different scenario. Scenario: I have my own mail server which can host multiple virtual domains and users (postfix+mysql). Now a client has domain called example.com and for mailing he […]
Convert new line to space by using sed command
This is a one line sed command trick in which we will convert the new line into space. I have a file in which there is a words per line.Now here I want to remove all these lines and instead of this I would like to use spaces. For eg. I have a file called […]
How to install pam_mysql in CentOS or Red Hat
How to install pam_mysql in CentOS or Red Hat While working on some mysql authentication.I required pam_mysql. In CentOS 6.4 I found it was not available even in CentOS 5 it was not also. Again same method is applied. Download the EPEL repo. Step 1: Install latest EPEL Repo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm Step 2: Now […]