Wednesday, September 29, 2010

Linux How to check all the installed packages by date time?

In Debian derived linux there is one folder "/var/lib/dpkg/info" this folder contains all the information about all installed packages in your system.

By issueing the following command we get them by date time.

$ls -l /var/lib/dpkg/info
output is in alphabatical order. To reverse the out put (i.e z to a)

$ls -l /var/lib/dpkg/info | tac :)

Wednesday, August 4, 2010

How to remove file of same extension in one shell command?

Type the following command..
Syntax:
find -iname "pattern" -exec rm -rf {} \;

example:
here i am going to delete all the virus .exe files in one go..
find . -iname "*.exe" -exec rm -rf {} \;

Hurray no virus in the current folder.. :)