zoukankan      html  css  js  c++  java
  • chgrp 简明笔记

    改变与文件相关联的组

    chgrp [optionsgroup file-list

    参数

    group 为新组的名称或者数值ID,file-list 为要改变其相关联组的文件路径名列表

    选项

    -c             显示更改过程信息

    -f              强制更改

    -R             递归更改目录

    -v              显示更改过后的信息

    示例

    chgrp

    复制代码
    Darling work # ls -l
    总用量 0
    -rw-r--r-- 1 siu siu 0  1月 10 15:08 temp
    Darling work # chgrp jack temp 
    Darling work # ls -l
    总用量 0
    -rw-r--r-- 1 siu jack 0  1月 10 15:08 temp
    复制代码

    更改普通文件temp的群组

    chgrp -Rv

    复制代码
    Darling work # ls -l
    总用量 4
    drwxr-xr-x 2 siu siu 4096  1月 10 15:13 dir
    Darling work # chgrp -Rv jack dir
    changed group of "dir" from siu to jack
    Darling work # ls -l
    总用量 4
    drwxr-xr-x 2 siu jack 4096  1月 10 15:13 dir
    复制代码

    递归更改目录的群组,并显示更改信息

    Tips

    更改群组需要root权限

  • 相关阅读:
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
    HDU
  • 原文地址:https://www.cnblogs.com/luoahong/p/6188674.html
Copyright © 2011-2022 走看看