Pwd-p Show absolute path, not link path
Mkidr-m default permissions, ignoring umask values, such as
[Email protected] ~]#RM-RF test/[[Email protected]~]#mkdirTest-m the[[Email protected]~]# ll Total dosage8-RW-------.1Root root1382November - -: -anaconda-ks.cfg-rw-r--r--.1Root root1433November - A: theinitial-setup-ks.cfgdrwx------.2Root root6May - -: -Test
-P is created recursively, and default permissions are specified, and the default permissions are only valid for the most specific directory
[Email protected] ~]#mkdir-pvm -test/test1/test2mkdir: The directory has been created"Test"mkdir: The directory has been created"Test/test1"mkdir: The directory has been created"Test/test1/test2"[[Email Protected]lhost~]# ll Total dosage8-RW-------.1Root root1382November - -: -anaconda-ks.cfg-rw-r--r--.1Root root1433November - A: theinitial-setup-KS.CFGDRWXR-xr-x.3Root root -May - -: onTest[[email protected]~]# CD test/[[email protected] test]# ll total dosage0drwxr-xr-x.3Root root -May - -: onTest1[[email protected] test]# CD test1/[[email protected] test1]# ll total dosage0Dr-X------.2Root root6May - -: onTest2
ls: Parameter
-A is more than-a. and.
-D directory itself, not listing contents
-F list directly, do not sort by letter, etc. fast
-F additional data structures, which are useful in certain non-color display terminals
-H easier to read data size, humanreadable
-I list inode numbers
-L Long format
-N Turn user,group information into Uid,gid
-R Reverse Output
-R recursion
-S sorted by file size
-T sorted by time
--color=never,always,auto Color display Settings
--full-time Full Time
--time (Atime,ctime,mtime)
Cp:
-a equivalent to-PDR (where p is large p)
-d Copy the linked file if it is a linked file
-F coercion, the target is present and cannot be opened, after the removal is tried once
-I interaction, if the target exists, then ask, by default with alias
-l Copy as hard link
-P small p is copied along with the attribute, if the copy is a linked file, copy the source file, and the Inode is different, independent of two files
lrwxrwxrwx.1Root root OneMay - -: AboutFile1-/root/file1drwx------. -Gandefeng Gandefeng4096May - -:Genevagandefengdrwx------.6Jerry Jerry4096MayTen -: -Jerry[[email protected] home]#CP-p file1 file2[[email protected] home]# ll total dosage Alrwxrwxrwx. 1Root root OneMay - -: AboutFile1-/root/file1-rw-r--r--.1Root root1354May - -:xxfile2drwx------. -Gandefeng Gandefeng4096May - -:Genevagandefengdrwx------.6Jerry Jerry4096MayTen -: -Jerry[[email protected] home]#
[Email protected] home]# ll-i./~/./: Total dosage A37326466lrwxrwxrwx.1Root root OneMay - -: AboutFile1-/root/file137326492-rw-r--r--.1Root root1354May - -:xxfile271042883DRWX------. -Gandefeng Gandefeng4096May - -:GenevaGandefeng71689916DRWX------.6Jerry Jerry4096MayTen -: -Jerry/root/: Total dosage -69135647-RW-------.1Root root1382November - -: -anaconda-ks.cfg71836130Drwxr-xr-x.2Root root -May - -: -Directory171836120-rw-r--r--.1Root root1354May - -:xxfile171836127-rw-r--r--.1Root root0May - -: +file271836132-rw-r--r--.1Root root -May - -: theFile371020069-rw-r--r--.1Root root1433November - A: theInitial-setup-ks.cfg
-P Large p, if the linked file is copied, copy the linked file and still point to the file to which the linked file is being copied
[Email protected] home]#CP-P file1 file2[[email protected] home]# ll-I total dosage837326466lrwxrwxrwx.1Root root OneMay - -: AboutFile1-/root/file137326492lrwxrwxrwx.1Root root OneMay - -: ,File2-/root/file171042883DRWX------. -Gandefeng Gandefeng4096May - -:GenevaGandefeng71689916DRWX------.6Jerry Jerry4096MayTen -: -Jerry
-R or-R recursive replication
-S is copied as a symbolic link, and creating a symbolic link can only be created in the directory where the symbolic link ends
[Email protected] ~]#lsAnaconda-ks.cfg directory1 file1 file2 file3 initial-setup-Ks.cfg[[email protected]~]#CP-S file1/home/CP:"/home/file1": Relative Symbolic links can only be created in the current directory [[email protected]~]# cd/home/[email protected] home]#CP-s/root/file1./[[email protected] home]# ll total dosage8lrwxrwxrwx. 1Root root OneMay - -: AboutFile1-/root/file1drwx------. -Gandefeng Gandefeng4096November - -: thegandefengdrwx------.6Jerry Jerry4096MayTen -: -Jerry
-U means update, target is newer than source copy
-L and large p are opposite, similar to small p
Cat: (TAC Inverse)
-A equals-vet
-B Displays line numbers for non-blank lines, blank lines do not appear
-N Blank line also displays line number
-e Display break characters $
-T displays the tab symbol [tab] to display it ^i
-V shows some special characters that can't be seen
nl
-b Specifies how the line number is displayed, a means that the line number is also listed, whether or not it is empty, similar to Cat-n, and T is null if there is a blank line, the default value
-n:ln line number at the left of the screen, RN line number in the field of the most right display, no 0,RZ line number on the right side of the field display, plus 0
-W line number occupies the number of digits
[Email protected] ~]#NL-B a-n RZ-W 5/etc/Fstab00001 00002 #00003#/etc/Fstab00004# Created by Anaconda on Sun Nov - A: ,: on .00005 #00006# Accessible filesystems, by reference, is maintained under'/dev/disk'00007# SeeMansPages Fstab (5), Findfs (8),Mount(8) and/or Blkid (8) for More Info00008 #00009uuid=728c3dfc-efde-4212-8BC9-FB4419E5F9A0/XFS defaults1 100010uuid=c434bbf0-040f-451c-9644-74d204cd01bf/boot XFS Defaults1 200011uuid=a6fafb81-3c1a-4e18-b65a-3da35a7f987e Swap swap Defaults0 0
Permissions: Hidden properties of a file
Chattr
+,-, = Add, remove, set-fixed
A access time atime unchanged when accessing this file
s synchronously writes to disk, which is usually asynchronous, that is, sometimes it needs to write to the disk in memory, plus s writes synchronously
A can only add data, cannot be changed or deleted, only root can be set
C Automatically compress files and extract them when read
D Skip at Dump
I cannot delete, rename, set link, update, i.e. fully fixed file, only root can be set
s deleted immediately, unable to recover
U and S opposite
Lsattr View Chattr Set Properties-a list hidden properties,-D to directory-R recursion
SUID SGID Sbit
? SUID
1 only valid for binaries, cannot be set on shell scripts, and is not valid for directories
2 Performer has execute permission on the program
3 This permission is valid only during the execution of the program
4 The performer will have the permission of the owner of the program
Sgi
1 useful for binary programs, also useful for directories
2 program performer has execute permission for the program
3 access to the program group during execution
Sbit
1 only valid for directory
2 When the user has WX permissions to this directory, the user establishes a file or directory in this directory, which has its own and root can be deleted
Linux Archives and Directory management