linux命令学习(53 54)-stat groupadd

 
【命令名称】stat
【使用权限】所有人
【命令语法】stat
【功能说明】显示文件或者文件系统的状态
【常用参数】
            f 显示文件系统的信息
            c 指定格式输出,具体格式可以用man stat来查看
【命令实例】
[cxc@cxcserver ~]$ stat /                                 #查看/目录状态
 File: `/'
 Size: 4096            Blocks: 16         IO Block: 4096   directory
Device: 802h/2050d      Inode: 2           Links: 24
Access: (0755/drwxr-xr-x) Uid: (    0/    root)   Gid: (    0/    root)
Access: 2013-01-02 16:33:57.000000000 +0800
Modify: 2013-01-02 13:42:10.000000000 +0800
Change: 2013-01-02 13:42:10.000000000 +0800
[cxc@cxcserver ~]$ stat -f /                               #加了-f就是查看文件系统的状态
 File: "/"
    ID: 0        Namelen: 255     Type: ext2/ext3
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 2299198    Free: 1715008    Available: 1596328
Inodes: Total: 2375712    Free: 2283618
[cxc@cxcserver ~]$stat -c %a /
755
[root@client01 ~]#
 
 
 
 
【命令名称】groupadd
【使用权限】root
 
【命令语法】groupadd  [-g gid] [-r]  群组名
【功能说明】新增一个组
【常用参数】
            g    指定的组ID号
            r    建立系统组
            f    新建一个组,如果存在强制覆盖
【命令实例】
1 增加一个名为www的组,并查看
[cxc@cxcserver ~]$ sudo groupadd www                       
[sudo] password for cxc:
[cxc@cxcserver ~]$ grep www /etc/group                      
www:x:503:
[cxc@cxcserver ~]$
 
2.增加一个组,并指定gid为777
[cxc@cxcserver ~]$ sudo groupadd -g 777 xxx
[sudo] password for cxc:
[cxc@cxcserver ~]$ tail -1 /etc/group
xxx:x:777:
[cxc@cxcserver ~]$
 

你可能感兴趣的:(linux,linux命令,linux系统)