On Debian/Ubuntu you can do so using the dpkg search function:
# sudo dpkg -S /etc/init.d/whoopsie
whoopsie: /etc/init.d/whoopsie
On RedHat/CentOS you can use the rpm command:
# rpm -qf /usr/bin/bash
Tech tips, mostly to do with Linux, Ubuntu, Grails, PHP, development tools and so on...
# sudo dpkg -S /etc/init.d/whoopsie
whoopsie: /etc/init.d/whoopsie
# rpm -qf /usr/bin/bash
chkconfig --list
rcconf
chkconfig [service name] on
update-rc.d [service name] enable
chkconfig [service name] off
update-rc.d [service name] disable
mkdir /etc/tomcat6/Catalina/example.org
cp /etc/tomcat6/Catalina/localhost/ROOT.xml /etc/tomcat6/example.org
mkdir /var/lib/tomcat6/example.org
cp -r /var/lib/tomcat6/webapps/ROOT /var/lib/tomcat6/example.org
sudo service tomcat6 restart
$ sudo apt-get upgrade
[sudo] password for srdan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-headers-server linux-image-server linux-server
0 upgraded, 0 newly installed, 0 to remove and 3 not upgrade
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
linux-headers-3.2.0-27 linux-headers-3.2.0-27-generic linux-image-3.2.0-27-generic
The following packages will be upgraded:
linux-headers-server linux-image-server linux-server
3 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 51.2 MB of archives.
After this operation, 217 MB of additional disk space will be used.
Do you want to continue [Y/n]?