Latest Linux News

Linux Today


Linux Terminal Command Reference

Sep 24, 2015   By Alexio


grep pattern files – Search for pattern in files
grep -r pattern dir – Search recursively for pattern in dir
command | grep pattern – Search for pattern in the output of command
locate file – Find all instances of file
find / -name filename – Starting with the root directory, look for the file called filename
find / -name ”*filename*” – Starting with the root directory, look for the file containing the string filename
locate filename – Find a file called filename using the locate command; this assumes you have already used the command updatedb (see next)
updatedb – Create or update the database of files on all file systems attached to the Linux root directory
which filename – Show the subdirectory containing the executable file  called filename
grep TextStringToFind /dir – Starting with the directory called dir, look for and list all files containingTextStringToFind

Full Detail


Sep 22, 2015   By SATHIY AMOORTHY


Create a new tar archive.

$ tar cvf archive_name.tar dirname/  

Extract from an existing tar archive.

$ tar xvf archive_name.tar  

View an existing tar archive.

$ tar tvf archive_name.tar  

More tar examples: The Ultimate Tar Command Tutorial with 10 Practical Examples

Full Detail

Linux vs. Windows: Which is Most Secure?

Sep 15, 2015   By Kenneth van Wyk

I’m more secure on Linux than I am on Windows. Yup, that’s right. I have no doubt whatsoever that I am.

I started down this path by comparing how secure I am on a Mac vs. on Windows, then I compared Mac vs. Linux. To complete that trifecta, I guess it’s only fair to compare the end-user data security aspects of Windows against Linux.

Before I get into my rationale, though, just a little more background is in order. I started using a UNIX desktop way back in college and was always comfortable there. At my first couple of jobs after college, I mostly used UNIX workstations from Dec and Sun as my primary desktops.

Later, I started using Windows-based systems at the office, but never felt quite at home. I was constantly frustrated by the frequent reboots, lack of serious security capabilities (from my perspective), and such. Then, following a brief foray in OS/2, I quickly gravitated to running Linux at home so I could once again have a real multi-tasking working environment.

Nowadays, my primary desktop is on a Macbook Pro – the best computer I’ve ever owned, without any doubt.

Full Detail



Linux tips every geek should know:

#1: Check processes not run by you
  • Difficulty: Expert
  • Application: bash
Imagine the scene - you get yourself ready for a quick round of Crack Attack against a colleague at the office, only to find the game drags to a halt just as you're about to beat your uppity subordinate - what could be happening to make your machine so slow? It must be some of those other users, stealing your precious CPU time with their scientific experiments, webservers or other weird, geeky things!
OK, let's list all the processes on the box not being run by you!
ps aux | grep -v `whoami`  
Or, to be a little more clever, why not just list the top ten time-wasters:
ps aux  --sort=-%cpu | grep -m 11 -v `whoami`   
It is probably best to run this as root, as this will filter out most of the vital background processes. Now that you have the information, you could just kill their processes, but much more dastardly is to run xeyes on their desktop. Repeatedly!
#2: Replacing same text in multiple files
  • Difficulty: Intermediate
  • Application: find/Perl
If you have text you want to replace in multiple locations, there are several ways to do this. To replace the text Windows with Linux in all files in current directory called test[something] you can run this:
perl -i -pe 's/Windows/Linux/;' test*  
To replace the text Windows with Linux in all text files in current directory and down you can run this:
find . -name '*.txt' -print | xargs perl -pi -e's/Windows/Linux/ig' *.txt  
Or if you prefer this will also work, but only on regular files:
find -type f -name '*.txt' -print0 | xargs --null perl -pi -e 's/Windows/Linux/'  
Saves a lot of time and has a high guru rating!

Read More