zoukankan      html  css  js  c++  java
  • file permission example

    touch testfile
    ls -l testfile
    -rw-r--r--   1 yourname yourname    0 2011-04-05 05:44 testfile

    chmod u+wx testfile
    ls -l testfile
    -rwxr--r--   1 yourname yourname    0 2011-04-05 05:44 testfile

    chmod ug-x testfile
    ls -l testfile
    -rw-r--r-- 1 yourname yourname 0 2011-04-05 05:44 testfile

    chmod a-r testfile
    ls -l testfile
    --w------- 1 yourname yourname 0 2011-04-05 05:44 testfile

    Which user?
    u     user/owner
    g     group
    o     other
    a     all
    What to do?
    +     add this permission
    -     remove this permission
    =     set exactly this permission
    Which permissions?
    r     read
    w     write
    x     execute
  • 相关阅读:
    用户登录
    open >>>文件操作
    随机数
    内置函数
    函数练习
    函数的动态参数
    函数的指定参数
    函数的普通参数
    函数的初步认识
    copy
  • 原文地址:https://www.cnblogs.com/greencolor/p/2006106.html
Copyright © 2011-2022 走看看