mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
2
tldr/du
2
tldr/du
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# du
|
||||
|
||||
> Disk usage: estimate and summarize file and directory space usage.
|
||||
> More information: <https://www.gnu.org/software/coreutils/du>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/du-invocation.html>.
|
||||
|
||||
- List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB):
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# expand
|
||||
|
||||
> Convert tabs to spaces.
|
||||
> More information: <https://www.gnu.org/software/coreutils/expand>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/expand-invocation.html>.
|
||||
|
||||
- Convert tabs in each file to spaces, writing to `stdout`:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# expr
|
||||
|
||||
> Evaluate expressions and manipulate strings.
|
||||
> More information: <https://www.gnu.org/software/coreutils/expr>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/expr-invocation.html>.
|
||||
|
||||
- Get the length of a specific string:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# factor
|
||||
|
||||
> Print the prime factorization of a number.
|
||||
> More information: <https://www.gnu.org/software/coreutils/factor>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/factor-invocation.html>.
|
||||
|
||||
- Display the prime-factorization of a number:
|
||||
|
||||
|
||||
2
tldr/fmt
2
tldr/fmt
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# fmt
|
||||
|
||||
> Reformat a text file by joining its paragraphs and limiting the line width to a number of characters (75 by default).
|
||||
> More information: <https://www.gnu.org/software/coreutils/fmt>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/fmt-invocation.html>.
|
||||
|
||||
- Reformat a file:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Print group memberships for a user.
|
||||
> See also: `groupadd`, `groupdel`, `groupmod`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/groups>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/groups-invocation.html>.
|
||||
|
||||
- Print group memberships for the current user:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# hostid
|
||||
|
||||
> Print the numeric identifier for the current host (not necessarily the IP address).
|
||||
> More information: <https://www.gnu.org/software/coreutils/hostid>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/hostid-invocation.html>.
|
||||
|
||||
- Display the numeric identifier for the current host in hexadecimal:
|
||||
|
||||
|
||||
2
tldr/id
2
tldr/id
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# id
|
||||
|
||||
> Display current user and group identity.
|
||||
> More information: <https://www.gnu.org/software/coreutils/id>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/id-invocation.html>.
|
||||
|
||||
- Display current user's ID (UID), group ID (GID) and groups to which they belong:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Copy files and set attributes.
|
||||
> Copy files (often executable) to a system location like `/usr/local/bin`, give them the appropriate permissions/ownership.
|
||||
> More information: <https://www.gnu.org/software/coreutils/install>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/install-invocation.html>.
|
||||
|
||||
- Copy files to the destination:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# join
|
||||
|
||||
> Join lines of two sorted files on a common field.
|
||||
> More information: <https://www.gnu.org/software/coreutils/join>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/join-invocation.html>.
|
||||
|
||||
- Join two files on the first (default) field:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Create a hard link to an existing file.
|
||||
> For more options, see the `ln` command.
|
||||
> More information: <https://www.gnu.org/software/coreutils/link>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/link-invocation.html>.
|
||||
|
||||
- Create a hard link from a new file to an existing file:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# cat
|
||||
|
||||
> Print and concatenate files.
|
||||
> More information: <https://www.gnu.org/software/coreutils/cat>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html>.
|
||||
|
||||
- Print the contents of a file to `stdout`:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Change SELinux security context of a file or files/directories.
|
||||
> See also: `secon`, `restorecon`, `semanage-fcontext`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/chcon>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chcon-invocation.html>.
|
||||
|
||||
- View security context of a file:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Split a file into pieces.
|
||||
> This generates files named "xx00", "xx01", and so on.
|
||||
> More information: <https://www.gnu.org/software/coreutils/csplit>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/csplit-invocation.html>.
|
||||
|
||||
- Split a file at lines 5 and 23:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# dd
|
||||
|
||||
> Convert and copy a file.
|
||||
> More information: <https://www.gnu.org/software/coreutils/dd>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html>.
|
||||
|
||||
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`) and show the progress:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# df
|
||||
|
||||
> Display an overview of the filesystem disk space usage.
|
||||
> More information: <https://www.gnu.org/software/coreutils/df>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html>.
|
||||
|
||||
- Display all filesystems and their disk usage:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# fold
|
||||
|
||||
> Folds long lines for fixed-width output devices.
|
||||
> More information: <https://www.gnu.org/software/coreutils/fold>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/fold-invocation.html>.
|
||||
|
||||
- Fold lines in a fixed width:
|
||||
|
||||
|
||||
29
tldr/linux/libinput
Normal file
29
tldr/linux/libinput
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# libinput
|
||||
|
||||
> Interface with libinput.
|
||||
> More information: <https://wayland.freedesktop.org/libinput/doc/latest/>.
|
||||
|
||||
- List all devices recognized by libinput:
|
||||
|
||||
`sudo libinput list-devices`
|
||||
|
||||
- Print all libinput events:
|
||||
|
||||
`sudo libinput debug-events`
|
||||
|
||||
- Show a GUI to visualize libinput's events:
|
||||
|
||||
`sudo libinput debug-gui`
|
||||
|
||||
- Debug tablet axis values:
|
||||
|
||||
`sudo libinput debug-tablet`
|
||||
|
||||
- Display help:
|
||||
|
||||
`libinput -h`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# mknod
|
||||
|
||||
> Create block or character device special files.
|
||||
> More information: <https://www.gnu.org/software/coreutils/mknod>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/mknod-invocation.html>.
|
||||
|
||||
- Create a block device:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# mktemp
|
||||
|
||||
> Create a temporary file or directory.
|
||||
> More information: <https://www.gnu.org/software/coreutils/mktemp>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html>.
|
||||
|
||||
- Create an empty temporary file and print its absolute path:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ptx
|
||||
|
||||
> Generate a permuted index of words from text files.
|
||||
> More information: <https://www.gnu.org/software/coreutils/ptx>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/ptx-invocation.html>.
|
||||
|
||||
- Generate a permuted index where the first field of each line is an index reference:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Remove files or directories.
|
||||
> See also: `rmdir`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/rm>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html>.
|
||||
|
||||
- Remove specific files:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Remove directories without files.
|
||||
> See also: `rm`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/rmdir>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html>.
|
||||
|
||||
- Remove specific directories:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Run a program in a different SELinux security context.
|
||||
> See also: `secon`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/runcon>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/runcon-invocation.html>.
|
||||
|
||||
- Print the security context of the current execution context:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# sleep
|
||||
|
||||
> Delay for a specified amount of time.
|
||||
> More information: <https://www.gnu.org/software/coreutils/sleep>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/sleep-invocation.html>.
|
||||
|
||||
- Delay in seconds:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Display and concatenate files with lines in reversed order.
|
||||
> See also: `cat`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/tac>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tac-invocation.html>.
|
||||
|
||||
- Concatenate specific files in reversed order:
|
||||
|
||||
|
||||
2
tldr/ln
2
tldr/ln
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ln
|
||||
|
||||
> Create links to files and directories.
|
||||
> More information: <https://www.gnu.org/software/coreutils/ln>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html>.
|
||||
|
||||
- Create a symbolic link to a file or directory:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# logname
|
||||
|
||||
> Shows the user's login name.
|
||||
> More information: <https://www.gnu.org/software/coreutils/logname>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/logname-invocation.html>.
|
||||
|
||||
- Display the currently logged in user's name:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# mkfifo
|
||||
|
||||
> Make FIFOs (named pipes).
|
||||
> More information: <https://www.gnu.org/software/coreutils/mkfifo>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/mkfifo-invocation.html>.
|
||||
|
||||
- Create a named pipe at a given path:
|
||||
|
||||
|
||||
2
tldr/mv
2
tldr/mv
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# mv
|
||||
|
||||
> Move or rename files and directories.
|
||||
> More information: <https://www.gnu.org/software/coreutils/mv>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/mv-invocation.html>.
|
||||
|
||||
- Rename a file or directory when the target is not an existing directory:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Execute a program with a custom scheduling priority (niceness).
|
||||
> Niceness values range from -20 (the highest priority) to 19 (the lowest).
|
||||
> More information: <https://www.gnu.org/software/coreutils/nice>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/nice-invocation.html>.
|
||||
|
||||
- Launch a program with altered priority:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# nohup
|
||||
|
||||
> Allows for a process to live when the terminal gets killed.
|
||||
> More information: <https://www.gnu.org/software/coreutils/nohup>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/nohup-invocation.html>.
|
||||
|
||||
- Run a process that can live beyond the terminal:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# nproc
|
||||
|
||||
> Print the number of processing units (normally CPUs) available.
|
||||
> More information: <https://www.gnu.org/software/coreutils/nproc>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html>.
|
||||
|
||||
- Display the number of available processing units:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# numfmt
|
||||
|
||||
> Convert numbers to and from human-readable strings.
|
||||
> More information: <https://www.gnu.org/software/coreutils/numfmt>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/numfmt-invocation.html>.
|
||||
|
||||
- Convert 1.5K (SI Units) to 1500:
|
||||
|
||||
|
||||
2
tldr/od
2
tldr/od
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Display file contents in octal, decimal or hexadecimal format.
|
||||
> Optionally display the byte offsets and/or printable representation for each line.
|
||||
> More information: <https://www.gnu.org/software/coreutils/od>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/od-invocation.html>.
|
||||
|
||||
- Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with `*`:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# readlink
|
||||
|
||||
> Follow symlinks and get symlink information.
|
||||
> More information: <https://www.gnu.org/software/coreutils/readlink>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/readlink-invocation.html>.
|
||||
|
||||
- Print the absolute path which the symlink points to:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# paste
|
||||
|
||||
> Merge lines of files.
|
||||
> More information: <https://www.gnu.org/software/coreutils/paste>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/paste-invocation.html>.
|
||||
|
||||
- Join all the lines into a single line, using TAB as delimiter:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# pathchk
|
||||
|
||||
> Check the validity and portability of pathnames.
|
||||
> More information: <https://www.gnu.org/software/coreutils/pathchk>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/pathchk-invocation.html>.
|
||||
|
||||
- Check pathnames for validity in the current system:
|
||||
|
||||
|
||||
2
tldr/pr
2
tldr/pr
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# pr
|
||||
|
||||
> Paginate or columnate files for printing.
|
||||
> More information: <https://www.gnu.org/software/coreutils/pr>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/pr-invocation.html>.
|
||||
|
||||
- Print multiple files with a default header and footer:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# printf
|
||||
|
||||
> Format and print text.
|
||||
> More information: <https://www.gnu.org/software/coreutils/printf>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/printf-invocation.html>.
|
||||
|
||||
- Print a text message:
|
||||
|
||||
|
||||
2
tldr/pwd
2
tldr/pwd
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# pwd
|
||||
|
||||
> Print name of current/working directory.
|
||||
> More information: <https://www.gnu.org/software/coreutils/pwd>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/pwd-invocation.html>.
|
||||
|
||||
- Print the current directory:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# readlink
|
||||
|
||||
> Follow symlinks and get symlink information.
|
||||
> More information: <https://www.gnu.org/software/coreutils/readlink>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/readlink-invocation.html>.
|
||||
|
||||
- Get the actual file to which the symlink points:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# realpath
|
||||
|
||||
> Display the resolved absolute path for a file or directory.
|
||||
> More information: <https://www.gnu.org/software/coreutils/realpath>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/realpath-invocation.html>.
|
||||
|
||||
- Display the absolute path for a file or directory:
|
||||
|
||||
|
||||
2
tldr/rm
2
tldr/rm
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Remove files or directories.
|
||||
> See also: `rmdir`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/rm>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html>.
|
||||
|
||||
- Remove specific files:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Remove directories without files.
|
||||
> See also: `rm`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/rmdir>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html>.
|
||||
|
||||
- Remove specific directories:
|
||||
|
||||
|
||||
2
tldr/seq
2
tldr/seq
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# seq
|
||||
|
||||
> Output a sequence of numbers to `stdout`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/seq>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html>.
|
||||
|
||||
- Sequence from 1 to 10:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# sha1sum
|
||||
|
||||
> Calculate SHA1 cryptographic checksums.
|
||||
> More information: <https://www.gnu.org/software/coreutils/sha1sum>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/sha1sum-invocation.html>.
|
||||
|
||||
- Calculate the SHA1 checksum for one or more files:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# shred
|
||||
|
||||
> Overwrite files to securely delete data.
|
||||
> More information: <https://www.gnu.org/software/coreutils/shred>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/shred-invocation.html>.
|
||||
|
||||
- Overwrite a file:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# shuf
|
||||
|
||||
> Generate random permutations.
|
||||
> More information: <https://www.gnu.org/software/coreutils/shuf>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/shuf-invocation.html>.
|
||||
|
||||
- Randomize the order of lines in a file and output the result:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# sort
|
||||
|
||||
> Sort lines of text files.
|
||||
> More information: <https://www.gnu.org/software/coreutils/sort>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html>.
|
||||
|
||||
- Sort a file in ascending order:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# split
|
||||
|
||||
> Split a file into pieces.
|
||||
> More information: <https://www.gnu.org/software/coreutils/split>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/split-invocation.html>.
|
||||
|
||||
- Split a file, each split having 10 lines (except the last split):
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# stdbuf
|
||||
|
||||
> Run a command with modified buffering operations for its standard streams.
|
||||
> More information: <https://www.gnu.org/software/coreutils/stdbuf>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html>.
|
||||
|
||||
- Change `stdin` buffer size to 512 KiB:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# stty
|
||||
|
||||
> Set options for a terminal device interface.
|
||||
> More information: <https://www.gnu.org/software/coreutils/stty>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/stty-invocation.html>.
|
||||
|
||||
- Display all settings for the current terminal:
|
||||
|
||||
|
||||
2
tldr/sum
2
tldr/sum
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Compute checksums and the number of blocks for a file.
|
||||
> A predecessor to the more modern `cksum`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/sum>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/sum-invocation.html>.
|
||||
|
||||
- Compute a checksum with BSD-compatible algorithm and 1024-byte blocks:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# sync
|
||||
|
||||
> Flushes all pending write operations to the appropriate disks.
|
||||
> More information: <https://www.gnu.org/software/coreutils/sync>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/sync-invocation.html>.
|
||||
|
||||
- Flush all pending write operations on all disks:
|
||||
|
||||
|
||||
2
tldr/tac
2
tldr/tac
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Display and concatenate files with lines in reversed order.
|
||||
> See also: `cat`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/tac>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tac-invocation.html>.
|
||||
|
||||
- Concatenate specific files in reversed order:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Display the last part of a file.
|
||||
> See also: `head`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/tail>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tail-invocation.html>.
|
||||
|
||||
- Show last 'count' lines in file:
|
||||
|
||||
|
||||
2
tldr/tee
2
tldr/tee
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# tee
|
||||
|
||||
> Read from `stdin` and write to `stdout` and files (or commands).
|
||||
> More information: <https://www.gnu.org/software/coreutils/tee>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html>.
|
||||
|
||||
- Copy `stdin` to each file, and also to `stdout`:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Check file types and compare values.
|
||||
> Returns 0 if the condition evaluates to true, 1 if it evaluates to false.
|
||||
> More information: <https://www.gnu.org/software/coreutils/test>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/test-invocation.html>.
|
||||
|
||||
- Test if a given variable is equal to a given string:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# timeout
|
||||
|
||||
> Run a command with a time limit.
|
||||
> More information: <https://www.gnu.org/software/coreutils/timeout>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html>.
|
||||
|
||||
- Run `sleep 10` and terminate it after 3 seconds:
|
||||
|
||||
|
||||
2
tldr/tr
2
tldr/tr
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# tr
|
||||
|
||||
> Translate characters: run replacements based on single characters and character sets.
|
||||
> More information: <https://www.gnu.org/software/coreutils/tr>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tr-invocation.html>.
|
||||
|
||||
- Replace all occurrences of a character in a file, and print the result:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Returns a successful exit status code of 0.
|
||||
> Use this with the || operator to make a command always exit with 0.
|
||||
> More information: <https://www.gnu.org/software/coreutils/true>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/true-invocation.html>.
|
||||
|
||||
- Return a successful exit code:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# truncate
|
||||
|
||||
> Shrink or extend the size of a file to the specified size.
|
||||
> More information: <https://www.gnu.org/software/coreutils/truncate>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/truncate-invocation.html>.
|
||||
|
||||
- Set a size of 10 GB to an existing file, or create a new file with the specified size:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Perform a topological sort.
|
||||
> A common use is to show the dependency order of nodes in a directed acyclic graph.
|
||||
> More information: <https://www.gnu.org/software/coreutils/tsort>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tsort-invocation.html>.
|
||||
|
||||
- Perform a topological sort consistent with a partial sort per line of input separated by blanks:
|
||||
|
||||
|
||||
2
tldr/tty
2
tldr/tty
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# tty
|
||||
|
||||
> Returns terminal name.
|
||||
> More information: <https://www.gnu.org/software/coreutils/tty>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/tty-invocation.html>.
|
||||
|
||||
- Print the file name of this terminal:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Print details about the current machine and the operating system running on it.
|
||||
> See also `lsb_release`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/uname>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/uname-invocation.html>.
|
||||
|
||||
- Print kernel name:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# unexpand
|
||||
|
||||
> Convert spaces to tabs.
|
||||
> More information: <https://www.gnu.org/software/coreutils/unexpand>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/unexpand-invocation.html>.
|
||||
|
||||
- Convert blanks in each file to tabs, writing to `stdout`:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Output the unique lines from a input or file.
|
||||
> Since it does not detect repeated lines unless they are adjacent, we need to sort them first.
|
||||
> More information: <https://www.gnu.org/software/coreutils/uniq>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/uniq-invocation.html>.
|
||||
|
||||
- Display each line once:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Remove a link to a file from the filesystem.
|
||||
> The file contents is lost if the link is the last one to the file.
|
||||
> More information: <https://www.gnu.org/software/coreutils/unlink>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/unlink-invocation.html>.
|
||||
|
||||
- Remove the specified file if it is the last link:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# uptime
|
||||
|
||||
> Tell how long the system has been running and other information.
|
||||
> More information: <https://www.gnu.org/software/coreutils/uptime>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/uptime-invocation.html>.
|
||||
|
||||
- Print current time, uptime, number of logged-in users and other information:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Display a list of logged in users.
|
||||
> See also: `useradd`, `userdel`, `usermod`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/users>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/users-invocation.html>.
|
||||
|
||||
- Print logged in usernames:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> List directory contents.
|
||||
> Drop-in replacement for `ls -l`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/vdir>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/vdir-invocation.html>.
|
||||
|
||||
- List files and directories in the current directory, one per line, with details:
|
||||
|
||||
|
||||
2
tldr/wc
2
tldr/wc
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# wc
|
||||
|
||||
> Count lines, words, and bytes.
|
||||
> More information: <https://www.gnu.org/software/coreutils/wc>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html>.
|
||||
|
||||
- Count all lines in a file:
|
||||
|
||||
|
||||
2
tldr/who
2
tldr/who
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Display who is logged in and related data (processes, boot time).
|
||||
> See also: `whoami`.
|
||||
> More information: <https://www.gnu.org/software/coreutils/who>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/who-invocation.html>.
|
||||
|
||||
- Display the username, line, and time of all currently logged-in sessions:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# whoami
|
||||
|
||||
> Print the username associated with the current effective user ID.
|
||||
> More information: <https://www.gnu.org/software/coreutils/whoami>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/whoami-invocation.html>.
|
||||
|
||||
- Display currently logged username:
|
||||
|
||||
|
||||
2
tldr/yes
2
tldr/yes
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Output something repeatedly.
|
||||
> This command is commonly used to answer yes to every prompt by install commands (such as apt-get).
|
||||
> More information: <https://www.gnu.org/software/coreutils/yes>.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/yes-invocation.html>.
|
||||
|
||||
- Repeatedly output "message":
|
||||
|
||||
|
||||
Reference in New Issue
Block a user