一个查询命令的网站 explainshell.com

一、使用步骤

1. 输入链接 explainshell.com,进入首页

1.jpg

2. 输入所要查询命令,查看释义

2.jpg

3. 点击搜索到的命令,查看参数

3.jpg

4. 拷取相应命令,到项目中使用

4.jpg

二、相关命令

1. ls

  • 命令释义:list directory contents / 列出目录中的内容
  • 命令演示:ls demo / 罗列 demo 目录中所有内容
  • 相关参数:
    • -a -all:do not ignore entries starting with . / 罗列所有内容,包括隐藏文件(以 . 开头的文件)
    • -l:use a long listing format / 以表格形式罗列内容,能够展示更加详细的信息

2. cat

  • 命令释义:concatenate files and print on the standard output / 输出目标文件内的内容
  • 命令演示:cat demo.txt / 打印出 demo.txt 中的内容

3. mv

  • 命令释义:move (rename) files / 移动文件或重命名文件
  • 命令演示:
    • mv demo.txt target.txt / 重命名 demo.txt 文件改名为 target.txt
    • mv test.txt demo / 移动 test.txt 文件到 demo 目录中
  • 相关参数:
    • -f:do not prompt before overwriting / 强制执行

4. touch

  • 命令释义:change file timestamps / 更改文件的时间戳,或新建一个不存在的文件
  • 命令演示:touch demo.txt / 如果 demo.txt 不存在则创建,否则更新文件
  • 相关参数:
    • -a:change only the access time / 只更改存取时间
    • -d:parse STRING and use it instead of current time / 使用指定的日期时间,而非现在的时间
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容