Facl:filesystem access Control list to save additional access controls with file extensions
Access order for general permissions: Owner--group--other
If there is an access order for additional permissions: Owner--facl.user--group--facl.group--other
Set additional permissions: Setfacl View additional permissions: Getfacl
-m set-X cancel-M U:uid: Privilege set additional user rights-M G:gid: Privilege Set Additional group permissions-X u:uid cancel-M Dg:gid extended permissions on directory and its subdirectories
Terminal type: Consols: Console pty: Physical terminal TTY: Virtual terminal-ttys: Serial terminal pts/#: Pseudo terminal
W shows who logged in and shows what the user is doing who displays the user's logon time WhoAmI show this user
Last Displays the login log history of the current system/var/wtmp/file record information-N # displays only the most recent logon information LASTB display user error logon attempts/var/log/btmp file record information Lastlog display the last successful login for each user on the system Record Information-u username Displays the specified user
BaseName directly obtains the file base name, cannot take the directory name of the command itself, the script itself executes script when the script path base name
Mail:echo "Mail Content" | Mail-s "Mail name" (root or send mail to other users)
Generate random Number:
RANDOM: Variable within range 0-32768 ($RANDOM)
Case
Case $ variable in
value1)
statement;;
value2)
statement;;
ESAC (end)
Disk Management:
Mechanical HDD: Factory (low-level format, partition disk sector)--partition (partitioning)--File system
Mbr:master boot Record master boot records, stored in 0 tracks 0 sectors, total 512 bytes, independent of the operating system
512: Divided into 3 segments, 446byte--boot loader bootloader program code 64byte--each 16 bytes to identify a partition, so the hard disk can only be divided into 4 primary partitions 2--mark the MBR is valid
Partition: There can be only four primary partitions, but the extended partition may have multiple logical partitions, and only one (primary + extended <=4) partition in the extended partition is per cylinder, and storage is
File system, the management software is not on the partition (somewhere on the disk), but the data is on the partition
File type: the
Hard links: Files of different paths point to the same inode node (-n source file link file name)
1. Cannot apply to directory
2. Cannot cross file system
3. Creating a hard link increases the number of file links
Symbolic Link: path to another file (-n-s source file Link file name-V display procedure)
1. Available Applications and catalogs
2. Can cross file system
3. No increase in the number of links
4. Size is the number of characters that are included in the fixed path
Du: Displays all file sizes of the directory-s displays the size of the directory-N Conversion display units
DF: Display disk Information-H conversion display Unit-I display inode information
Device files:
B: per block, random access (hard disk)
C: By character, linear access (keyboard)
Device number:
Main device number: Identifies the device type
Secondary device number: Identifies a different device of the same type
To create a character block device file:
Mknod [option] name type (B/C) primary number (-m:mod permission)
Device file name of the device for the hard disk:
IDE (ATA): Hda SATA:SDA USB:SDC Scsi:sdb (a b c d.. Distinguish between different devices of the same type)
SDA:SDA1 sda2 Sda3 sda4 is the primary partition number (the system will reserve 1-4) the extended partition can only be 5, and cannot be used directly, and a logical partition should be established on it.
Linux Supported file systems:
ext2 ext3 ext4 XFS reiserfs NFS OCFS2 GFS2 JFS FAT32 NTFS iso9660 CIFS .....
To manage disk partitions:
Fdisk-l View all disks can also be specified with the device path view Fdisk/dev/sda2
FDISK/DEV/SDA: Disk Creation Delete interaction mode (disk device cannot be partitioned behind must)
P: Display the current hardware partition including unsaved changes N: Create new Partition (e: Extended partition P: Primary partition) d: Delete a partition w: Save exit Q: Do not save exit T: Modify partition type (L: Show supported partition types) L show supported partition types
Cat/proc/partitions: View kernel-recognized partitions
Partprobe: Reread partition table (Partx can also)
This article is from the "stupid Bird first-FAI" blog, please be sure to keep this source http://benniaoxianhui.blog.51cto.com/10463960/1679204