LS Common command parameters
LS:-F to add different representations to different files, add hats
d/l* =s
-A: Show files with hidden files starting with.
-P: Add to directory Only/
-T: Sort by modified time
--time-style=long-iso:ls-l--time-style=long-iso display friendly long format time
-R: Backwards sort Reverse
-S: Sort by file size
-H: Shown in the range of human understanding
-I: Index node (directory of the inode== book) print the index number of each file (the kernel differs by this file whether the files are the same)
Ls–l File Display content analysis
First column: File type (10 characters total) + permissions --man Find search type to see-: Normal file D: Directory C: Character device-/dev/tty such as USB interface, CAT, etc. serial port device B: Block device -- and/dev to find, for example, the optical drive, the hard disk, etc.: SELinux related l: Link file--Soft Connect second column: Number of hard links default starting from 1 if it is a directory, the default is 2 (directory does not make hard links) The third column: The file belongs to the main fourth column: The genus Group Fifth column: File size 第六-八 column: Creation time/Last modified time nineth column: file name
Attached: File type "man find search type to see"
Commonly used commands are shown:
Sort by chronological order
Ls-ltr H.txt
Add color to the output file, not the entire line output color
Ls-l--color=auto
Show only Directories
Ls-l | grep "^d" ==>ls-lf | The grep "/$" directory is followed by a slash to clearly indicate the directory ==>ls-ld */
Show files beginning with numbers
LS [0-9]*
File Installation size Flashback:
Ll-hsr
List all files and directories under the/HOME/OMC folder for more information
Ll-r/HOME/OMC
List the absolute path of the file in LS "Replace with pwd command after finding the file"
ls | Sed "s#^# ' pwd '/#"
Lists the absolute path to all files (including hidden files) in the current directory, without recursion to the directory
Find/home/omc-maxdepth 1 |xargs ls-ld
Common alias settings for LS
Alias l= ' Ls-alf '
Linux ls Command detailed