zoukankan      html  css  js  c++  java
  • chmod(转) Anny

    Refer to http://72.235.176.168/qnxman/chmod.html

    chmod

    change file modes (POSIX)
    Syntax:


    chmod [-R] mode file...

    Options:

    -R
        Recursively change file modes. For each file that names a directory, chmod changes the file mode bits of the directory and all files in the file hierarchy below it.
    mode
        Represents the change to be made to the file mode of each file named (see the Description below).
    file
        The pathname of a file whose file mode bits are to be modified.

    Description:

    The chmod utility lets you change any or all of the file permission mode bits of one or more files. For each file you name, chmod changes the file permission mode bits according to the mode operand.

    To change a file's permission mode bits, the user of chmod must be either the owner of the file or the superuser.

    The mode option can be either a symbolic_mode expression or a non-negative octal integer.
    Symbolic Modes

    The symbolic_mode has the following form:

        * [[agou] [+-=] [rswx]] [,symbolic_mode]

    The options of the symbolic form are:
    Global Monitoring Division    
            Home        |        About GMD        |        Research Areas        |        Information and Data        |        Observatories
       
    Option    Description
    a    user, group, and other access
    g    group access
    o    other access
    u    user access
    +    add specified permissions to the group, other, or user category of the specified files
    -    remove specified permissions from the group, other, or user category of the specified files
    =    set the specified permissions for the group, other, or user category of the specified files
    r    read permission
    s    set userid or groupid when executed
    w    write permission
    x    execute permission

    The agou specification is optional. When it is not supplied, all the permissions (user, group and other) will be affected, but for + and = operators only those permissions not set in the file creation mask (see umask) will be set.
    Some examples of symbolic modes:

    Make myfile executable by all:

    chmod a+x myfile


    Remove read permission for group and others:

    chmod og-r myfile


    Perform both the above operations, in the order given, on three files: myfile, file2, and zzz:

    chmod a+x,og-r myfile file2 zzz


  • 相关阅读:
    用例输入单元测试(3)参数化测试方法
    线程文件[MFC]线程优先级设置,下拉列表框ComboBox,复选框CButton,列表框CListBox的使用
    设置系统SetLocalTime设置系统时间
    页面错误毕业设计之错误集锦(六)
    定义数据类型SQL server中SET ANSI_PADDING对char、varchar、nvarchar的影响
    查找关键字算法:静态查找表(Static Search Table)
    密码注册ASP.NET实现忘记密码
    卡函数or1200基于simplespi的SD卡驱动
    目的地返回POJ 2336 动态规划(DP) Ferry Loading II
    坐标序列hdu 1003 解题报告 Max Sum
  • 原文地址:https://www.cnblogs.com/limei/p/2150339.html
Copyright © 2011-2022 走看看