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

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

linux command to list the files from rpm package without extracting

March 26, 2014 by Sharad Chhetri Leave a Comment

Question: What is the linux command to list the files from rpm package without extracting ?
Answer : To do listing of files from rpm file package we will use rpm2cpio and cpio command.

It is good practice to check list of files before extracting files from rpm package.
By viewing list of files we can select the particular file name to be extracted out from rpm package.

To list the files from rpm package

Use below given command to list the files from rpm package.Here, -t option with cpio command is for listing the files from archive.

Syntax:

rpm2cpio package-name.rpm |cpio -t

In below given example,we have listed the files from vsftpd-2.2.2-6.el6.i686.rpm package

[root@localhost ~]# rpm2cpio vsftpd-2.2.2-6.el6.i686.rpm |cpio -t
./etc/logrotate.d/vsftpd
./etc/pam.d/vsftpd
./etc/rc.d/init.d/vsftpd
./etc/vsftpd
./etc/vsftpd/ftpusers
./etc/vsftpd/user_list
./etc/vsftpd/vsftpd.conf
./etc/vsftpd/vsftpd_conf_migrate.sh
./usr/sbin/vsftpd
./usr/share/doc/vsftpd-2.2.2
./usr/share/doc/vsftpd-2.2.2/AUDIT
./usr/share/doc/vsftpd-2.2.2/BENCHMARKS
./usr/share/doc/vsftpd-2.2.2/BUGS
./usr/share/doc/vsftpd-2.2.2/COPYING
./usr/share/doc/vsftpd-2.2.2/Changelog
./usr/share/doc/vsftpd-2.2.2/EXAMPLE
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE/README
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE/README.configuration
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE/vsftpd.conf
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE/vsftpd.xinetd
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE_NOINETD
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE_NOINETD/README
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE_NOINETD/README.configuration
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/PER_IP_CONFIG
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/PER_IP_CONFIG/README
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/PER_IP_CONFIG/README.configuration
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/PER_IP_CONFIG/hosts.allow
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/README
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_HOSTS
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_HOSTS/README
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS/README
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS/README.configuration
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS/logins.txt
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS/vsftpd.conf
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS/vsftpd.pam
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS_2
./usr/share/doc/vsftpd-2.2.2/EXAMPLE/VIRTUAL_USERS_2/README
./usr/share/doc/vsftpd-2.2.2/FAQ
./usr/share/doc/vsftpd-2.2.2/INSTALL
./usr/share/doc/vsftpd-2.2.2/LICENSE
./usr/share/doc/vsftpd-2.2.2/README
./usr/share/doc/vsftpd-2.2.2/README.security
./usr/share/doc/vsftpd-2.2.2/REWARD
./usr/share/doc/vsftpd-2.2.2/SECURITY
./usr/share/doc/vsftpd-2.2.2/SECURITY/DESIGN
./usr/share/doc/vsftpd-2.2.2/SECURITY/IMPLEMENTATION
./usr/share/doc/vsftpd-2.2.2/SECURITY/OVERVIEW
./usr/share/doc/vsftpd-2.2.2/SECURITY/TRUST
./usr/share/doc/vsftpd-2.2.2/SIZE
./usr/share/doc/vsftpd-2.2.2/SPEED
./usr/share/doc/vsftpd-2.2.2/TODO
./usr/share/doc/vsftpd-2.2.2/TUNING
./usr/share/doc/vsftpd-2.2.2/vsftpd.xinetd
./usr/share/man/man5/vsftpd.conf.5.gz
./usr/share/man/man8/vsftpd.8.gz
./var/ftp
./var/ftp/pub
706 blocks
[root@localhost ~]# 

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Extract single and selected files from RPM package on Linux
  2. list files and directories by 4 commands in linux
  3. rsync all files,hidden files,symlinks,hardlinks to remotes Linux Server
  4. Yum command to download rpm file without installing in linux system
  5. How to extract RPM package on Linux system
  6. Read the file inside compressed .gz files without extract
  7. yum : how to find rpm package which has certain command or file
  8. How to find installation date and time of rpm package
  9. How to test rpm package before installation
  10. How to create OpenSSH rpm package and its upgrade

Filed Under: Linux

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

find command to search keyword in files recursively in linux

error could not configure a c compiler Linux

Run the script using nohup without hitting enter key two times

Change the default port number of ssh server

AttributeError: ‘WSGIRequest’ object has no attribute ‘session’ Django python web framework

Change default editor of crontab in Ubuntu

How to set JAVA environment variables in Linux

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy