linux-命令-概述

1.[root@localhost~]#,其中#代表当前是root用户登录,如果$代表当前未普通用户.

2.~ 代表当前工作目录;.代表目前所在目录;  ..代表上一层目录,./表示当前目录

3.ls -l可以查看文件或目录的权限

4.linux文件有四种权限 r可读,w可写,x可执行,-无权限

-rw-r--r--   1 root root 时间  文件名

文件第一列由10个字符组成

第一表示文件类型,-表示文件,d表示目录  ,后面三个为一组

第一组,2-4 表示文件所有者的权限 ,即用户权限,简称u

第二组,5-7表示文件所有者所属组的权限 (group权限),简称g

第三组,8-10表示所有者所属组其他成员的权限,other权限,简称o

chmod u+w lhh02.txt

chmod g+w lhh02.txt

chmod o+w lhh02.txt

chmod u=rwx,g=rwx,o=rwx lhh02.txt  一起变

r可以用4表示,w可以用2表示,x可以用1表示

chmod 644 lhh02.txt

chmod 777 lhh02.txt

 

posted @ 2020-10-20 15:05  dahuinihao  阅读(77)  评论(0编辑  收藏  举报