Useful Linux commands

To list the locations of installed files for a given package:
dpkg -L eclipse

Check also the cheat sheet for dpkg command:
http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php

To display general information about a single package:
apt-cache showpkg eclipse

Find all files that begins with “wtrace.tr.” and ends with either one or two digits, e.g. “wtrace.tr.1″ or “wtrace.tr.10″ in current folder and recursive folders:
find -regex .*/wtrace.tr.[0-9]+

If we want to find the files as above and at the same time want to gzip all the files found, we may combine the previous command as follows:
find -regex .*/wtrace.tr.[0-9]+ -exec gzip {} \;

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.