RHCE (REDHAT7) (ii)
The hard disk is in sector,1 sector is 512b (6 and below in cylinder,1 cylinder is about 8M)
The partition format for XFS supports up to 500T (6 and below partition formats of Ext4, up to 50T support)
Fdisk MBR Partitioning method
Gdisk GPT Partitioning method
Parted Advanced partitioning operations (create, copy, resize partitions, etc.)
Partprobe Refresh partition table (or restart server)
Fdisk-l
Fdisk/dev/sdb (n new,p print,d Delete,w save,t change type)
+10g Specify a partition size of 10G
MKFS.XFS MKFS.EXT4
Mkfs.xfs-f (xfs multiple times need to add -f)
Xfs-admin-l Opt/dev/sda3 (xfs partition Tag)
A2label/dev/sda5 "Backup" (ext4 partition Tag)
Blkid/dev/sda3 viewing device UUID
DF/ (in bytes)
Df-h/ (in M,G )
Df-ht/ (T denotes partition type, e.g.XFS)
Du. (Statistics current directory file size, bytes)
Du-sh. (Statistics the file size in the current directory, M,G)
Baobab Bring up graphics hard disk space analysis tool
/etc/fstab mount the device to the system save file
Mount-a is /etc/fstab file in effect
Mount-o mount with specific options
Defaults including Rw,suid,dev,exec,async
Umount Uninstall
LSOF/AA (can see who is using, process number)
Mount-o REMOUNT,RO/RW/AA
Mount-o REMOUNT,NOEXEC/AA
Mount10.0.0.2:/var/mnt (Mount NFS share)
Mount--bind/opt/mnt/opt Mount a directory to another directory (camouflage)
Mkswap/dev/sda6 increase swap space
Swapon-a activating swap space
Swapon-s View activated swap
Swapoff/dev/sda6 closing the swap partition
Swapon-p5/dev/sda6 set swap priority
Ls-i
Ln-s (file type will be displayed as "L")
Ls-l (- general file,D directory,l Link,B- block device, C- character device,P- named pipe,s Sockets)
/run/root/media Disc Default path
Acl
Getfacl
Setfacl
Setfacl-m o:r/tmp/aa.log (set other accounts to have read access to/tmp/aa.log)
Setfacl-x u:aa/tmp/aa.log (remove user AA for /tmp/aa.log file ACL)
Setfacl-b/tmp/aa.log (remove all ACLs)
Getfacl/tmp/aa.log viewing ACLs
Setfacl-m u:aa:rwx/tmp/aa.log (set user AA to /tmp/aa.log have read and write execution permissions)
ACL information is not inherited by default (to inherit the Mask setting)
Setfacl-m D:U:AA:RWX/AA (Effective range is below directory, no effect on directory)
Setfacl-m u:aa:rwx/aa/
Mount | grep home View Mount of home partition (e.g. mount source, partition format, etc.)
XFS Partition Set space quotas
you must first Defaults,usrquota,grpquota the/etc/fstab/home partition and then restart the server (otherwise it will be reported Xfs_quota:cannotset Limits function not implemented error)
# xfs_quota–x–c "Limit bsoft=30g bhard=40g AA"/Home
# xfs_quota–x–c Report/home
Local Database directory for /var/lib/rpm rpm
Rpm-i Installation
Rpm–e Uninstall
Rpm–i–nodeps Ignore dependency installation
Rpm–i–force installation of a re- installed
Rpm–u upgrade, software does not exist is equivalent to-I
Rpm–u–oldpackage downgrade
Rpm–f upgrade, the software must first exist
Rpm–qa View All packages
Rpm–q Check a single package
which package is provided by the RPM–QF file
Rpm–l viewing software information
RPM–QPI Viewing package compilation information
RPM–QPL What files will be installed
rpm–qp–scipts Check script information
Rpm–v Package name (no output instructions, there is a problem with the output, such as Not available Rpm–i–force re-installation)
/ETC/PKI/RPM-GPG Signature File
Rpm–import Importing Signatures
Rpm–import/etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
Rpm–qa |grep Gpg-pubkey
RPM–VVK Package name Check Signature
Yuminstall Installation
Yumremove/erase Uninstall
Yumupdate Upgrade
Yumgroup Install "KDE" installs a set of packages
Yumlocalinstall = Rpm–i
Yum search software name
Yumlist software name
Yum Listall
Yumgroup List
Yumwhatprovides/bin/ls = RPM–QF
Yum reinstall= rpm–i--force
This article is from the "Linux" blog, so be sure to keep this source http://yangzhiming.blog.51cto.com/4849999/1717778
RHCE (REDHAT7) (ii)