Linux all in one desk reference for dummies phần 7
Số trang: 67
Loại file: pdf
Dung lượng: 1.21 MB
Lượt xem: 11
Lượt tải: 0
Xem trước 7 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu linux all in one desk reference for dummies phần 7, công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Linux all in one desk reference for dummies phần 7424 Working with RPM Files You can see a list of all installed RPMs by using the following command: rpm -qa You see a long list of RPMs scroll by your screen. To view the list one screen at a time, type rpm -qa | more If you want to search for a specific package, feed the output of rpm -qa to the grep command. For example, to see all packages with kernel in their names, type rpm -qa | grep kernel The result depends on what parts of the kernel RPMs are installed on a system. You can query much more than a package’s version number with the rpm -q command. By adding single-letter options, you can find out other useful information. For example, try the following command to see the files in the cups package: rpm -ql cups Here are a few more useful forms of the rpm -q commands to query informa- tion about a package (to use any of these rpm -q commands, type the com- mand, followed by the package name): ✦ rpm -qc: Lists all configuration files in a package. ✦ rpm -qd: Lists all documentation files in a package. These are usually the online manual pages (also known as man pages). ✦ rpm -qf: Displays the name of the package (if any) to which a specified file belongs. ✦ rpm -qi: Displays detailed information about a package, including ver- sion number, size, installation date, and a brief description. ✦ rpm -ql: Lists all the files in a package. For some packages, you see a very long list. ✦ rpm -qs: Lists the state of all files in a package (the state of a file can be one of the following: normal, not installed, or replaced). TEAM LinG - Live, Informative, Non-cost and Genuine ! 425 Working with RPM FilesThese rpm commands provide information about installed packages only. If Book Vyou want to find information about an uninstalled RPM file, add the letter p Chapter 4to the command-line option of each command. For example, to view the listof files in the RPM file named rdist-6.1.5-792.i586.rpm, go to the direc- Installing and Applicationstory where that file is located and then type the following command: Updatingrpm -qpl rdist-*.rpmOf course, this command works only if the current directory contains thatRPM file.Two handy rpm -q commands enable you to find out which RPM file pro-vides a specific file and which RPMs need a specified package. To find outthe name of the RPM that provides a file, use the following command:rpm -q --whatprovides filenameFor example, to see which RPM provides the file /etc/vsftpd.conf, typerpm -q --whatprovides /etc/vsftpd.confRPM then prints the name of the package that provides the file, like this:vsftpd-1.2.1-69If you provide the name of a package instead of a filename, RPM displays thename of the RPM package that contains the specified package.On the other hand, to find the names of RPMs that need a specific package,use the following command:rpm -q --whatrequires packagenameFor example, to see which packages need the openssl package, typerpm -q --whatrequires opensslThe output from this command shows all the RPM packages that need theopenssl package.Installing an RPMTo install an RPM, use the rpm -i command. You have to provide the nameof the RPM file as the argument. If you want to view the progress of the RPMinstallation, use rpm -ivh. A series of hash marks (#) displays as the pack-age is unpacked. TEAM LinG - Live, Informative, Non-cost and Genuine !426 Working with RPM Files For example, to install the kernel-source RPM (which contains the source files for the Linux operating system) for Fedora Core from the companion DVD-ROM, I insert the DVD and after it’s mounted, I type the following commands: cd /mnt/cdrom/Fedora/RPMS rpm -ivh kernel-source* You don’t have to type the full RPM filename — you can use a few characters from the beginning of the name followed by an asterisk (*). Make sure you type enough of the name to identify the RPM file uniquely. If you try to install an RPM that’s already installed, the rpm -i command dis- plays an error message. For example, here is what happens when I type the following command to install the man package on my sys ...
Nội dung trích xuất từ tài liệu:
Linux all in one desk reference for dummies phần 7424 Working with RPM Files You can see a list of all installed RPMs by using the following command: rpm -qa You see a long list of RPMs scroll by your screen. To view the list one screen at a time, type rpm -qa | more If you want to search for a specific package, feed the output of rpm -qa to the grep command. For example, to see all packages with kernel in their names, type rpm -qa | grep kernel The result depends on what parts of the kernel RPMs are installed on a system. You can query much more than a package’s version number with the rpm -q command. By adding single-letter options, you can find out other useful information. For example, try the following command to see the files in the cups package: rpm -ql cups Here are a few more useful forms of the rpm -q commands to query informa- tion about a package (to use any of these rpm -q commands, type the com- mand, followed by the package name): ✦ rpm -qc: Lists all configuration files in a package. ✦ rpm -qd: Lists all documentation files in a package. These are usually the online manual pages (also known as man pages). ✦ rpm -qf: Displays the name of the package (if any) to which a specified file belongs. ✦ rpm -qi: Displays detailed information about a package, including ver- sion number, size, installation date, and a brief description. ✦ rpm -ql: Lists all the files in a package. For some packages, you see a very long list. ✦ rpm -qs: Lists the state of all files in a package (the state of a file can be one of the following: normal, not installed, or replaced). TEAM LinG - Live, Informative, Non-cost and Genuine ! 425 Working with RPM FilesThese rpm commands provide information about installed packages only. If Book Vyou want to find information about an uninstalled RPM file, add the letter p Chapter 4to the command-line option of each command. For example, to view the listof files in the RPM file named rdist-6.1.5-792.i586.rpm, go to the direc- Installing and Applicationstory where that file is located and then type the following command: Updatingrpm -qpl rdist-*.rpmOf course, this command works only if the current directory contains thatRPM file.Two handy rpm -q commands enable you to find out which RPM file pro-vides a specific file and which RPMs need a specified package. To find outthe name of the RPM that provides a file, use the following command:rpm -q --whatprovides filenameFor example, to see which RPM provides the file /etc/vsftpd.conf, typerpm -q --whatprovides /etc/vsftpd.confRPM then prints the name of the package that provides the file, like this:vsftpd-1.2.1-69If you provide the name of a package instead of a filename, RPM displays thename of the RPM package that contains the specified package.On the other hand, to find the names of RPMs that need a specific package,use the following command:rpm -q --whatrequires packagenameFor example, to see which packages need the openssl package, typerpm -q --whatrequires opensslThe output from this command shows all the RPM packages that need theopenssl package.Installing an RPMTo install an RPM, use the rpm -i command. You have to provide the nameof the RPM file as the argument. If you want to view the progress of the RPMinstallation, use rpm -ivh. A series of hash marks (#) displays as the pack-age is unpacked. TEAM LinG - Live, Informative, Non-cost and Genuine !426 Working with RPM Files For example, to install the kernel-source RPM (which contains the source files for the Linux operating system) for Fedora Core from the companion DVD-ROM, I insert the DVD and after it’s mounted, I type the following commands: cd /mnt/cdrom/Fedora/RPMS rpm -ivh kernel-source* You don’t have to type the full RPM filename — you can use a few characters from the beginning of the name followed by an asterisk (*). Make sure you type enough of the name to identify the RPM file uniquely. If you try to install an RPM that’s already installed, the rpm -i command dis- plays an error message. For example, here is what happens when I type the following command to install the man package on my sys ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính mẹo vặt máy tính kỹ thuật lập trình mẹo hay Linux tin học căn bản thủ thuật tin học tự học tin họcGợi ý tài liệu liên quan:
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 314 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 303 0 0 -
Kỹ thuật lập trình trên Visual Basic 2005
148 trang 265 0 0 -
Cách phân tích thiết kế hệ thống thông tin quan trọng phần 4
13 trang 217 0 0 -
Thủ thuật chặn web đen bằng phần mềm
10 trang 215 0 0 -
Sửa lỗi các chức năng quan trọng của Win với ReEnable 2.0 Portable Edition
5 trang 212 0 0 -
Xử lý tình trạng máy tính khởi động/tắt chậm
4 trang 211 0 0 -
Bài giảng điện tử môn tin học: Quản trị các hệ thống thông tin quản lý xuyên quốc gia
27 trang 211 0 0 -
Giáo trình Bảo trì hệ thống và cài đặt phần mềm
68 trang 207 0 0 -
NGÂN HÀNG CÂU HỎI TRẮC NGHIỆM THIẾT KẾ WEB
8 trang 206 0 0