Efficient commands

I cringe anytime I see someone code inefficiently. Here are three of the most common mistakes, followed by a better way to do the same thing. Bad: cat somefile | grep something Better: grep something…



Maintaining log and tmp file

If you need to maintain an application that generate a lot of logfiles or tmp files with running numbers as part of the filename and uses a common extension. These two command together will help to maintain…


Petya Ransomware: What You Need to Know

A global ransomware outbreak known as Petya has government agencies and private businesses around the globe scrambling to get their systems back online and recover their data. The ransomware spread like wildfire on Tuesday, hitting…


Tracking of logins and logouts on Linux/Unix distros

In the .login file add the commands: —————————— echo login time `date` >> .daylogs/masterlog grep -i “sun” .daylogs/masterlog > .daylogs/sunday.log grep -i “mon” .daylogs/masterlog > .daylogs/monday.log grep -i “tue” .daylogs/masterlog > .daylogs/tuesday.log grep -i “wen”…



How do I scan my Linux system for rootkits, worms, trojans, etc.?

Either with ckrootkit or with rkhunter. chkrootkit: Either install the package that comes with your distribution (on Debian you would run apt-get install chkrootkit ), or download the sources from www.chkrootkit.org and install manually: wget –passive-ftp ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz tar xvfz chkrootkit.tar.gz…



SamSam ransomware now demands $33,000 from victims

SamSam ransomware attacks are on the rise and operators are demanding more than ever from their victims, researchers have warned. Ransomware, a kind of malware which locks infected systems, encrypts files and demands a payment…


Basic Linux Commands

Here are the list of basic linux commands that you can practice. alias    Create an alias awk      Find and Replace text, database sort/validate/index break    Exit from a loop builtin  Run a shell builtin cal      Display a calendar…