How to install wget on RHEL/CentOS 7 using yum

Posted on in Categories , , , , , last updated November 22, 2016

I am trying to download a file using ‘wget http://url’ syntax, but I am getting an error:

bash: wget: command not found

How do I fix this problem? How can I install wget on a CentOS/RHEL 7 or 6 server using yum command?
Continue reading “How to install wget on RHEL/CentOS 7 using yum”

How to gzip and keep original file on Unix or Linux command line

Posted on in Categories , , , , , , last updated March 25, 2016

I would like to compress a log file using gzip Unix command line utility, and I would also like to keep the original file. However, when I use the gzip my-app.log command, results in modifying my log file and renaming it my-app.log.gz. How do I force the gzip command to keep original file while maintaining the original file on Linux or Unix-like system?