Available options: -h,--help Show this help text -v,--version Show version -u,--update Update offline cache of tldr pages -p,--platform PLATFORM Prioritize specfic platform while searching. Valid values include linux, osx, windows, sunos COMMAND name of the command -a,--about About this program
Ubuntu安装常见问题
No tldr entry for xxx
Ubuntu安装tldr使用tldr ls之后,很有可能出现类似No tldr entry for ls的命令,出现这种情况可能有下面两种情况:
首次安装需要更新tldr的“数据库”。
当天用户安装使用sudo,tldr的数据库没法访问。
1 2
ubuntu@VM-8-8-ubuntu:~$ tldr ls No tldr entry for ls
Options: -v, --version Display version -l, --list List all commands for the chosen platform in the cache -a, --list-all List all commands in the cache -1, --single-column List single command per line (use with options -l or -a) -r, --random Show a random command -e, --random-example Show a random example -f, --render [file] Render a specific markdown [file] -m, --markdown Output in markdown format -o, --os [type] Override the operating system [linux, osx, sunos, windows] --linux Override the operating system with Linux --osx Override the operating system with OSX --sunos Override the operating system with SunOS --windows Override the operating system with Windows -t, --theme [theme] Color theme (simple, base16, ocean) -s, --search [keywords] Search pages using keywords -u, --update Update the local cache -c, --clear-cache Clear the local cache -h, --help Show this help message
Examples:
$ tldr tar $ tldr du --os=linux $ tldr --search "create symbolic link to file" $ tldr --list $ tldr --list-all $ tldr --random $ tldr --random-example
[zxd@localhost ~]$ tldr ls ✔ Page not found. Updating cache... ⠴ Creating index... ✔ Creating index...
ls
List directory contents. More information: https://www.gnu.org/software/coreutils/ls.
- List files one per line: ls -1
- List all files, including hidden files: ls -a
- List all files, with trailing / added to directory names: ls -F
- Long format list (permissions, ownership, size, and modification date) of all files: ls -la
- Long format list with size displayed using human-readable units (KiB, MiB, GiB): ls -lh
- Long format list sorted by size (descending): ls -lS
- Long format list of all files, sorted by modification date (oldest first): ls -ltr
- Only list directories: ls -d */
Cheat
介绍
这个漫画是Cheat恶搞man命令查一个命令需要翻几本书的时间,挺有意思的。
cheat:有欺骗的意思,可以直接理解为舞弊或者作弊。
官方资料
github项目地址: cheat/cheat: cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember. (github.com)
官方安装教程:cheat/INSTALLING.md at master · cheat/cheat (github.com)
ubuntu@VM-8-8-ubuntu:/tmp$ cheat A config file was not found. Would you like to create one now? [Y/n]: y Would you like to download the community cheatsheets? [Y/n]: y Cloning community cheatsheets to /home/ubuntu/.config/cheat/cheatsheets/community. Enumerating objects: 335, done. Counting objects: 100% (335/335), done. Compressing objects: 100% (314/314), done. Total 335 (delta 36), reused 274 (delta 19), pack-reused 0 Cloning personal cheatsheets to /home/ubuntu/.config/cheat/cheatsheets/personal. Created config file: /home/ubuntu/.config/cheat/conf.yml Please read this file for advanced configuration information.
[zxd@localhost tmp]$ cheat A config file was not found. Would you like to create one now? [Y/n]: y Would you like to download the community cheatsheets? [Y/n]: y Cloning community cheatsheets to /home/zxd/.config/cheat/cheatsheets/community. Enumerating objects: 335, done. Counting objects: 100% (335/335), done. Compressing objects: 100% (314/314), done. Total 335 (delta 36), reused 274 (delta 19), pack-reused 0 Cloning personal cheatsheets to /home/zxd/.config/cheat/cheatsheets/personal. Created config file: /home/zxd/.config/cheat/conf.yml Please read this file for advanced configuration information.
# 基础使用 ubuntu@VM-8-8-ubuntu:/tmp$ cheat cp # To copy a file: cp ~/Desktop/foo.txt ~/Downloads/foo.txt
# To copy a directory: cp -r ~/Desktop/cruise_pics/ ~/Pictures/
# To create a copy but ask to overwrite if the destination file already exists: cp -i ~/Desktop/foo.txt ~/Documents/foo.txt
# To create a backup file with date: cp foo.txt{,."$(date +%Y%m%d-%H%M%S)"}
# To copy a symlink that points to a directory (and is thus soft) and not # 'expand' the symlink (aka, preserve its nature as a symlink): # Note this does NOT work (note trailing '/'): cp -P /path/to/symlink-dir/ cp -P <symlink-dir> <dest-dir>
# To copy sparsely: cp --sparse=always <src> <dest>
类似项目
还有更多和cheat以及tldr类似的项目,这里就不过多介绍了。
Cheat 允许您在命令行上创建和查看交互式备忘单。它旨在帮助提醒 Linux 系统管理员他们经常使用但不够频繁而无法记住的命令的选项。