tldr一个精简的man手册替代品

tldr

假如你是一个对man手册那又臭又长的命令感觉到厌倦的人,你可以去了解一下tldr命令

安装

确保你的系统已经安装了npm

使用一下命令对tldr进行安装

	tldr  -  Too Long; Didn't Read

github地址

常用参数

  -V, --version            查看版本
  -l, --list               从缓存中列出平台支持的所有命令
  -a, --list-all           从缓存中列出所有命令
  -1, --single-column      单列列出所有支持的命令和 -l 和 -a一起使用
  -r, --random             随机显示支持的命令
  -e, --random-example     随机显示一个使用示例
  -f, --render [file]      显示 markdown [file] 中的特定字符行
  -m, --markdown           按照markdown格式进行输出
  # 这几个设置了没有用的命令
  -o, --os [type]          Override the operating system [linux, osx, sunos]
  --linux                  Override the operating system with Linux
  --osx                    Override the operating system with OSX
  --sunos                  Override the operating system with SunOS
  # 
  -t, --theme [theme]     颜色主题 (simple, base16, ocean)
  -s, --search [keywords]  使用关键字搜索页
  -u, --update             更新本地缓存
  -c, --clear-cache        清理本地缓存
  -h, --help               输出帮助信息

使用示例

andrew@andrew-Thurley:~$ tldr tar

  tar

  Archiving utility.
  Often combined with a compression method, such as gzip or bzip.
  More information: https://www.gnu.org/software/tar.

  - Create an archive from files:
    tar cf target.tar file1 file2 file3

  - Create a gzipped archive:
    tar czf target.tar.gz file1 file2 file3

  - Extract a (compressed) archive into the current directory:
    tar xf source.tar[.gz|.bz2|.xz]

  - Extract an archive into a target directory:
    tar xf source.tar -C directory

  - Create a compressed archive, using archive suffix to determine the compression program:
    tar caf target.tar.xz file1 file2 file3

  - List the contents of a tar file:
    tar tvf source.tar

  - Extract files matching a pattern:
    tar xf source.tar --wildcards "*.html"

andrew@andrew-Thurley:~$ tldr -r
PAGE git-checkout

  git checkout

  Checkout a branch or paths to the working tree.
  More information: https://git-scm.com/docs/git-checkout.

  - Create and switch to a new branch:
    git checkout -b branch_name

  - Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references):
    git checkout -b branch_name reference

  - Switch to an existing local branch:
    git checkout branch_name

  - Switch to the previously checked out branch:
    git checkout -

  - Switch to an existing remote branch:
    git checkout --track remote_name/branch_name

  - Discard all unstaged changes in the current directory (see git reset for more undo-like commands):
    git checkout .

  - Discard unstaged changes to a given file:
    git checkout file_name

  - Replace a file in the current directory with the version of it committed in a given branch:
    git checkout branch_name -- file_name
andrew@andrew-Thurley:~$ tldr -r
PAGE mutt

  mutt

  Command-line email client.
  More information: http://mutt.org.

  - Open the specified mailbox:
    mutt -f mailbox

  - Send an email and specify a subject and a cc recipient:
    mutt -s subject -c [email protected] [email protected]

  - Send an email with files attached:
    mutt -a file1 file2 -- [email protected]

  - Specify a file to include as the message body:
    mutt -i file [email protected]

  - Specify a draft file containing the header and the body of the message, in RFC 5322 format:
    mutt -H file [email protected]

关注公众号,免费送资料
在这里插入图片描述

发布了353 篇原创文章 · 获赞 133 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/andrewgithub/article/details/103192876