Multiple choice technology web technology

Which command would you use to get a list of all files inside the rpm-package foobar.rpm in /home/bob?

  1. rpm -ql /home/bob/foobar.rpm

  2. rpm -ql -p /home/bob/foobar.rpm

  3. rpm -l /home/bob/foobar.rpm

  4. rpm -l -p /home/bob/foobar.rpm

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

rpm -ql -p lists files in a package file (the -p flag specifies it's a package file, not installed). Without -p, rpm -ql queries installed packages. -l alone is not a valid rpm flag.