Linux文件系统介绍:
一、 查看文件
1、ls
2、cat
3、less and more
4、head and tail
二、文件基本操作
1、创建
2、删除
3、移动
4、复制
三、文件解压缩
1、zip
2、ungip
3、tar
tar xvf Python-3.6.6.tar.xz
# x:解压 v:显示所有过程 f:使用档案名字,切记,这个参数是最后一个参数,后面只能接档案名
四、文件进阶操作
1、查找文件
2、软连接
3、更改文件权限:
# 1 chmod 语法
"给谁设置文件权限(who), 对文件权限做什么样的改变(what), 设置哪种的文件权限(which)"
## who: u(user:文件所有者),g(group:用户所在组),o(others:其他组用户),a(all:全部用户)
## what: + (添加权限), - (删除权限), = (重新赋予权限)
## which: r(读权限), w(写权限), x(执行权限)
# 2 示例
chmod u=rw,og=r new_file.txt
chmod a+x new_script.sh # 等价 chmod +x new_script.sh
chmod o-r *.page
### If we had wanted to include files in subdirectories, we could have used the -R (recursive) option.
chmod -R o-r *.page
# 3 数字表征不同权限
0: (000) No permission.
1: (001) Execute permission.
2: (010) Write permission.
3: (011) Write and execute permissions.
4: (100) Read permission.
5: (101) Read and execute permissions.
6: (110) Read and write permissions.
7: (111) Read, write, and execute permissions.
chmod 664 *.page