Leeboy's Linux study Note 1

Source: Internet
Author: User

1. Use LS-L to view the file type.
D directory.
L Symbolic Link (pointing to another file ).
S socket file.
Block B device files.
C character device file.
P name the MPs queue file.
-Common files, or more accurately, do not belong to the above types of files.

2. Use the numeric method to modify file permissions in CHMOD.
Example: Symbol mode: chmod U + x O-W myfile absolute mode: chmod 777 myfile

3. If you set the permissions of users in the same group or other users for a directory to -- X, they will not be able to list this directory.
. If a script orProgram, As long as the user knows its path and file name,
You can still execute it. The user's access to this directory does not prevent execution.

4. chmod 4741, which changes the permission of the file to rws rw-r --. Other users who execute the shell script have the corresponding permissions of the owner during the execution phase. After the execution is complete, they will return the normal permissions.
For example, if the CHMOD 4755 rws r-X file is set to s u I d, the file owner has read, write, and execute permissions, all other users have read and execute permissions

5. view the group of the current user group groups leeboy view the group of the leeboy (the id command can also be used)

6./etc/passwd records all users

7. chown give the file owner to another user. chgrp then gives the group to another group.

8. umask sets the true permissions during creation. 022 directory 755 file 644: ----w-, directory rwx R-X, file RW-r --. Similar to reverse

9. soft connection: ln-s File Source Path directory hard link: ln. A soft connection is like a shortcut on Windows. A hard link is another name for the source file in the hard disk space. Deleting a soft connection in the source file path fails. The number of hard links is reduced by one, and the corresponding hard disk space remains unchanged.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.