8

I am following Linux CBT tutorials for RHEL to learn some LINUX basics.

If I want to know if a particular package is installed in ubuntu, I usually type dpkg -l and grep the needed name. Such as

dpkg -l | grep cron

Is it same as using

rpm -qa | grep cron

for Redhat based OSes?

That guy also uses rpm -ql to list the file locations. Such as

rpm -ql crontabs

Can some one tell me what exactly does rpm -ql list and how can I get a similar command in Ubuntu to list all relevant files like rpm -ql crontabs. (Right now, I use locate cron and it lists me every file)

10

dpkg -l <packagename> gives you the status of the package

dpkg -L <packagename> gives you a list of files including their locations

see also the manpage

| improve this answer | |
  • 2
    And, dpkg -S crontabs tells you which package provides the crontabs file. – Chris Jester-Young Oct 14 '10 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy