Tag Archives: cent os

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

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

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?
Halal Vitamins

Powered by WPeMatico

Unix / Linux: Remove duplicate lines from a text file using awk or perl

Unix / Linux: Remove duplicate lines from a text file using awk or perl
I have a text file with exact duplicates of lines. I need to remove all those duplicates lines and preserves the order too on Linux or Unix-like system. How do I delete duplicate lines from a text file? You can use Perl or awk or Python to delete all duplicate lines from a text file […]
Halal Vitamins

Powered by WPeMatico

How to check Debian/Ubuntu Linux package version using apt-get/aptitude command

How to check Debian/Ubuntu Linux package version using apt-get/aptitude command

I am a new Debian / Ubuntu Linux sysadmin. I would like to find out what version I would install if I ran the apt-get command. How do I find out which versions of a package can I install using apt-cache/apt-get command? How do you check package version using apt-get/aptitude on Debian or Ubuntu Linux server?
Halal Vitamins

Powered by WPeMatico

How to find out Raspberry Pi GPU and ARM CPU temperature on Linux

How to find out Raspberry Pi GPU and ARM CPU temperature on Linux
I am using a Raspberry PI 2/3 credit size computer. How do I find out my GPU or ARM CPU temperature from Linux operating system command line option?
Halal Vitamins

Powered by WPeMatico