Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)

share|improve this question

1 Answer 1

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

share|improve this answer
    
Thank you. Memorized! –  bcrawl Oct 14 '10 at 2:15
1  
And, dpkg -S crontabs tells you which package provides the crontabs file. –  Chris Jester-Young Oct 14 '10 at 2:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.