Posts

Showing posts from 2017

exFAT support in CentOS 7

exFat support in CentOS 7: "sudo yum install exfat-utils fuse-exfat"

Linux grep command

I have a file, called test.txt which contains the bellow contents: Mouse eats cheese. Cat eats mouse. Dog eats cat. Lamb eats dog. Worm eats lamb. Print the line where "Dog" is availabe: grep 'Dog' test.txt The output will be:   Dog eats cat. Show line above and below of "Dog": grep -C 1 'Dog' test.txt The output will be:   Cat eats mouse.   Dog eats cat.   Lamb eats dog. If I provide - C 2 then output contains 2 lines above and below of the "Dog".

How to reduce pdf file size from linux

Today, I have faced a weird problem about pdf file size. I had to send email to someone with pdf file attachment. The pdf file size was too big for the mail server. I am in linux platform. I have a tool to reduce the size. Yeah...........do it..........Hmm, what is the command please? gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -sOutputFile=small.pdf big.pdf