本 Wiki 开启了 HTTPS。但由于同 IP 的 Blog 也开启了 HTTPS,因此本站必须要支持 SNI 的浏览器才能浏览。为了兼容一部分浏览器,本站保留了 HTTP 作为兼容。如果您的浏览器支持 SNI,请尽量通过 HTTPS 访问本站,谢谢!
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
linux:bash [2021/12/29 16:55] – [Environment] codinghare | linux:bash [2024/01/14 13:57] (当前版本) – [Bash & Shell] codinghare | ||
---|---|---|---|
行 1: | 行 1: | ||
======Bash & Shell====== | ======Bash & Shell====== | ||
- | 常用的 bash 命令 | + | //常用的 bash 命令// |
---- | ---- | ||
- | ====命令==== | ||
- | ==ls== | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | drwxr-xr-x 5 cc eng 4096 Jun 24 16:51 action | + | ====Navigation==== |
- | Access rights. These indicate the read, write, and execute permissions on the file or directory allowed to the owner, the group, and all users. You can read more about file permissions. | + | <code bash> |
- | Number of hard links. This number counts the number of child directories and files. This number includes the parent directory link (..) and current directory link (.). | + | ##ls |
- | The username of the file’s owner. Here the username is cc. | + | # 查看当前目录下所有的文件夹和文件 |
- | The name of the group that owns the file. Here the group name is eng. | + | ls |
- | The size of the file in bytes. | + | # 查看所有文件夹和文件,包括隐藏 |
- | The date & time that the file was last modified. | + | ls -a |
- | The name of the file or directory | + | # 查看详细信息 |
+ | ls -l | ||
+ | # 查看文件,按上次修改时间排列 | ||
+ | ls -t | ||
+ | ##pwd | ||
+ | # 打印当前目录的路径 | ||
+ | pwd | ||
+ | ##cd | ||
+ | # 切换到指定文件夹 | ||
+ | cd <folder name> | ||
+ | cd < | ||
+ | # 返回上级目录 | ||
+ | cd .. | ||
+ | ##mkdir | ||
+ | # | ||
+ | mkdir <folder name> | ||
+ | ##touch | ||
+ | # | ||
+ | touch <file name> | ||
+ | </ | ||
+ | === ls -l 的详细信息解释=== | ||
+ | '' | ||
+ | <code bash> | ||
+ | drwxr-xr-x 5 cc eng 4096 Jun 24 16:51 action | ||
+ | </ | ||
+ | 具体的解释见下图: | ||
+ | {{ : | ||
+ | ==access right== | ||
+ | 背景知识:Linux 中: | ||
+ | * premission group 分为三类:// | ||
+ | * premission type 也分为三类:// | ||
+ | //access right// 是详细信息中的 10 位字母,结构如下: | ||
+ | * 头一位字母是 special permission flag | ||
+ | * 2-4 位代表了 owner 的权限 | ||
+ | * 5-7 代表了 group 的权限 | ||
+ | * 8-10 代表了 all user 的权限 | ||
+ | 权限中,read 权限标记为 '' | ||
+ | ====Viewing and Changing File System==== | ||
+ | ===Manipulation=== | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
* '' | * '' | ||
* '' | * '' |