Linux file access permission description and ls command example:-| rw-| r -- 1. r indicates readable, w indicates writable, -indicates that the owner of the file does not have the execution permission on the file. if the owner has the executable permission, use x. 2. the first character is the file type (the file type is divided into two types: normal text... linux file access permission description and ls command example:-| rw-| r -- 1. r indicates readable, w indicates writable, -indicates that the owner of the file does not have the execution permission on the file. if the owner has the executable permission, use x. 2. the first character is the file type (there are two types of files: common files and directory files. if they are common files, they are represented by a hyphen (-). if they are Directory files, they are represented by d .) 3. the remaining characters indicate the access permission to the file. 4. the last three characters of the first character indicate the access permission of the file owner to the file. 5. the next three characters indicate the access permissions of group members to files. 6. the subsequent three characters are the object access permissions of other users. Modify permissions on www.2cto.com and enter: Java code chmod o + w xxx. xxx indicates to authorize others to write xxx. permission for this file xxx Java code chmod go-rw xxx. xxx www.2cto.com indicates that xxx is deleted. read and write permissions for group groups and others in xxx, where: u represents the owner (user) g represents the owner's group (group) o represents others, but not u and g (other) a represent all people, that is, u, g and o r indicate that the file can be read (read) w indicates that the file can be written (write) x indicates that the file can be executed (if it is a program). rwx can also replace r ------------ 4 w ----------- 2 x -------------- 1------------- 0 action: + add a permission-delete a permission = make it a unique permission ls usage: Ls [OPTION]... [FILE]... list file information (the current directory by default). if-cftuvSUX or -- sort is not set, sort the entries in alphabetical order. 1) The Display range ls-a is not ignored. all files and directories, including hidden files and hidden directories. the ls-A is similar to ls-a, but not explicitly. and .. directory 2) The control display format is ls-1. each line lists a file. Note that it is 1 of 1234, not the letter l ls-x from left to right, the file and directory names are displayed in the upper-to-bottom horizontal column. the ls-n is similar to-l, but the user and group IDs are listed, that is, the owner and group names are not explicitly specified, instead of id (number) ls-l: -rw-r -- 1 sky 0 Aug 31 a.txt-rw-r -- 1 sky 0 Aug 31 B .tar ls-n: -rw-r -- 1 1000 1000 0 Aug 31 a.txt-rw-r -- 1 1000 1000 0 Aug 31 B .tar ls-Q. double quotation marks are added for each file and folder name, for example, "a.txt" "B .tar" "B .txt" "bash" "bash_list.sh" "bin" "dev" "workspace" ls-F adds an indicator to the entry, for example, the "lib" directory is displayed as "lib/" and the file remains unchanged. for example, a.txt B .tar B .txt bash/bash_list.sh @ bin/dev/workspace/ls-m is used for display ", "separates the names of each file and directory, for example, a.txt, B .tar, B .txt, bash, bash_list.sh, bin, dev, and workspace. 3) controls the long format of ls-l displayed content, one row of each file or directory, Display details: Display mode, number of links, owner, group, size (in bytes) and the last modification time of each file. ls-lG G is used to do not display the group name in long format like ls-l, however, the owner name ls-g is similar to ls-l, but the group information is not displayed. it is equivalent to the ls-lG ls-lh-h parameter, which is usually used together with-l, print the size in readable format (for example, 1 K 234 M 2G). The ls -- si-l -- si parameter is similar to the-h parameter and the size is printed in readable format, however, the calculation unit is 1024 Bytes rather than Bytes ls-s. The size of each file is displayed in block. The result is as follows: 0 a.txt 0 B .tar 0 B .txt 4 bash 0 bash_list.sh 4 bin 4 dev 4 workspace ls-I displays the inode number of the file and directory. The result is as follows: 148712 a.txt 148775 B. Txt 148773 bash_list.sh 148156 dev 148771 B .tar 148657 bash 148154 bin 148155 workspace ls-q. When a non-printable character (control character) occurs? (4) control the sorting by ls-r. reverse sorting by ls-U. list entries by directory order. ls-f is not ordered. Enable-aU and disable-ls -- color, that is, the l in ls-fl will expire. the ls-lS-S parameter indicates sorting by file and directory size. the ls-lt-t parameter indicates sorting by file and directory change time. sort by file and directory extensions in alphabetical order ls-v sort by version 5) recursively enumerate ls-R recursively enumerate subdirectories
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service