Access and modification of folders and files under Linux system, and the use of File and folder deletion RM-RF commands

Source: Internet
Author: User
Tags chmod file permissions

1, directly view the permissions of the file or folder command: >>ll or >>ls-l R for Read permissions, W Write permission, x for Execute permissions The first representative file type,-the representative is a normal file, d means that the folder permissions are divided into 3 groups, 3 a group, respectively, is the owner, belongs to the group, others

2, modify the file permissions: Rights Management command chmod, full spell: Chang permissions mode of a file syntax: chmod [{ugoa}{+-=}{rwx}][file or directory]        & nbsp          [mode=421][files or directories]                   -R Recursive modification U: Owner, G: Owning group, O: Other person, a: all; +: Add permissions,-reduce permissions, = Direct assignment to this permission  3, for example, add execute permission to the owner chmod u+x file name 4, you can set multiple permissions directly, for example: chmod u+x,g+w The file name  5, describes the second more common display of the number of permissions, 777,755, which respectively represents what the permission number represents: R-------------4w------------2x-------------1rwxrw-r--                   7    6   43 groups, rwx permissions corresponding to 421 add 7,rw-corresponding 42 Add the 6,r--corresponding to 4   (drwxrw-r--here the first character d for the folder;-rwxrw-r--  Here the first character-represents a normal file)  6, So let's see what the above 755 represents. 7 corresponds to 4+2+1 rwx5 corresponding 4+1     R-x then the permission of this file is the owner rwx, group R-x, others r-x when we change the permissions generally first think about what to change, Then correspond to the number of direct settings such as we want to change rw-r------corresponding number 640 We still modify just the file 7, for example, select-R to directly recursively modify the folder LXF the permissions of all files within the folder file permissions to modify the following: Modify the permissions of all files in the LXF folder as follows :  Delete folder: RM-RF + directory name such as delete/data/mysql directory and files, folders under it:rm-rf/data/mysql  delete files: For example, delete/data/log/eRror.log This file rm-rf/data/log/error.log  Note: Linux does not have a recycle Bin, you must be careful when using RM-RF   This article refer to address: https://jingyan.baidu.com/ article/4853e1e5413b541909f72632.html 

Permissions to view and modify folders and files under the Linux system, and the use of File and folder deletion RM-RF commands

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.