• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pacman –files Command Examples

by Deepika

“pacman –files” is an option for the pacman package manager in Arch Linux and its derivatives. It allows the user to display a list of all the files installed by a given package. The output of this option provides information about the package’s files, including the file names, file paths, and the package that installed each file.

This option can be useful for several reasons, such as:

  • Verifying the contents of a package: By using “pacman –files”, the user can see exactly what files were installed by a package, which can be useful in verifying that a package was installed correctly.
  • Finding the source of a file: If a file on the system cannot be found, “pacman –files” can be used to determine which package installed it, so the user can install the corresponding package to restore the missing file.
  • Checking for package upgrades: By using “pacman –files” before and after an upgrade, the user can compare the lists of files installed by a package and see if any new files were added or any old files were removed, indicating a change in the package.

pacman –files Command Examples

1. Update the package database:

# sudo pacman --files --refresh

2. Find the package that owns a specific file:

# pacman --files {{filename}}

3. Find the package that owns a specific file, using a regular expression:

# pacman --files --regex '{{regular_expression}}'

4. List only the package names:

# pacman --files --quiet {{filename}}

5. List the files owned by a specific package:

# pacman --files --list {{package_name}}

6. List only the absolute path to the files:

# pacman --query --list --quiet {{package_name}}

7. Display help:

# pacman --files --help

Filed Under: Linux

Some more articles you might also be interested in …

  1. mpstat: command not found
  2. loginctl Command Examples in Linux
  3. faillock Command Examples in Linux
  4. notify-send: command not found
  5. How to Execute Scripts/Commands using /etc/rc.d/rc.local in CentOS/RHEL 7
  6. pacman4console Command Examples in Linux
  7. How to Disable “alt+ctrl+Del” Key Combination causing reboot in CentOS/RHEL 4,5
  8. dget: command not found
  9. pkgmk Command Examples in Linux
  10. User Account “systemd-bus-proxy”

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright