rpm package search function
Query system installed software
Whether rpm -q Software name query software installed, rpm -qa view all installed software commonly used rpm -qa | grep .. Find an installed software
rpm -qf file name to view the installed files belong to which package, files are available which determine
rpm -ql name of the software packages to see which path to the installation
documentation to install the software name to view the location rpm -qd software, pay attention to the difference with the previous
rpm -qi software name to view package details
rpm -qc software name see software configuration file
packages and file name rpm -qR software to view installed software dependencies
which capabilities rpm -q --provides View software provides the software nameFor the package is not installed View
rpm -qpi xxx.rpm see the software packages use the version information (packageinfo)
file (packagelist) rpm -qpl xxx.rpm view package contains
rpm -qpR xxx.rpm view the package dependencies (R relevance)Partition, create a file system and mount
- 2G ⼀ create a system of files, zoomed ⼩ block is 2048 bytes, may be reserved 1% Use space, the file system
ext4, label is TEST, the partition boot claim automatically mount ⾄ / test of Contents, and the default there acl mount
options
echo -e "n\np\n\n\n+2G\nw\n" |fdisk /dev/sdb mkfs.ext4 -L TEST -m 1 -b 2048 /dev/sdb2 echo -e "LABEL=TEST /test\text4\tdefaults,acl\t 0\t 0" >> /etc/fstab
- ⼀ write a script, the following functions: (1) lists the current system identifies all disk devices (2) as
the number of disks is one, it is displayed Use spatial information. Otherwise, it displays the last spaces on the disk Use
Information
df|grep /dev/sd|tr -s " "|cut -d" " -f1 disknu=`df|grep /dev/sd|tr -s " "|cut -d" " -f1|wc -l`(此处简写为这个即可:disknu=`df|grep /dev/sd|wc -l`)
[ "$disknu" -eq 1 ]&& df|grep /dev/sd|tr -s " "|cut -d " " -f1,5||df|grep /dev/sd|tr -s " "|cut -d " " -f1,5|tail -n1
How to Add an 50G hard disk to the new block as a separate partition linux system, write specific operation command
commandecho -e "n\np\n\n+50G\nw\n" |fdisk /dev/sda
echo -e
\ n new line and move the cursor to the first line;
\ R & lt cursor to the beginning of the line, but does not wrap
\ t Tab insertion;