-
chown
英文全拼(change owner)用于设置文件所有者和文件关联组的命令
chown -R git:git /var/lib/gitea/
-
chmod
英文全拼(change mode) 控制用户对文件的权限
Linux/Unix 的文件调用权限分为三级 : 文件所有者(Owner)、用户组(Group)、其它用户(Other Users)。
rwx rwx rwx owner group otherusers chmod -R 750 /var/lib/gitea/
-
echo
echo可以理解成写入的意思。
echo test > text.txt #覆盖写入,无引号 echo test >> text.txt #追加写入,无引号
-shell
编写内容。
local_dir=$(pwd) #不能有空格
cd local_dir #echo local_dir