diff --git a/tldr/ansible-vault b/tldr/ansible-vault index a5ef9d88..6c27b33c 100644 --- a/tldr/ansible-vault +++ b/tldr/ansible-vault @@ -10,24 +10,28 @@ source: https://github.com/tldr-pages/tldr.git - Create a new encrypted vault file with a prompt for a password: -`ansible-vault create {{vault_file}}` +`ansible-vault create {{path/to/vault_file}}` -- Create a new encrypted vault file using a vault key file to encrypt it: +- Edit, view or re-key (re-encrypt) an existing encrypted vault file with a prompt for the password: -`ansible-vault create --vault-password-file {{password_file}} {{vault_file}}` +`ansible-vault {{edit|view|rekey}} {{path/to/vault_file}}` -- Encrypt an existing file using an optional password file: +- Create a new encrypted vault file using a password file to encrypt it: -`ansible-vault encrypt --vault-password-file {{password_file}} {{vault_file}}` +`ansible-vault create --vault-password-file {{path/to/password_file}} {{path/to/vault_file}}` + +- Encrypt an existing plaintext file in-place using a password file: + +`ansible-vault encrypt --vault-password-file {{path/to/password_file}} {{path/to/file}}` - Encrypt a string using Ansible's encrypted string format, displaying interactive prompts: `ansible-vault encrypt_string` -- View an encrypted file, using a password file to decrypt: +- View an encrypted vault file by using a password file to decrypt: -`ansible-vault view --vault-password-file {{password_file}} {{vault_file}}` +`ansible-vault view --vault-password-file {{path/to/password_file}} {{path/to/vault_file}}` -- Re-key already encrypted vault file with a new password file: +- Re-key (re-encrypt) an already encrypted vault file with a new password file: -`ansible-vault rekey --vault-password-file {{old_password_file}} --new-vault-password-file {{new_password_file}} {{vault_file}}` +`ansible-vault rekey --vault-password-file {{path/to/old_password_file}} --new-vault-password-file {{path/to/new_password_file}} {{path/to/vault_file}}` diff --git a/tldr/conda-create b/tldr/conda-create index 3678ffa8..4782245c 100644 --- a/tldr/conda-create +++ b/tldr/conda-create @@ -10,13 +10,13 @@ source: https://github.com/tldr-pages/tldr.git - Create a new environment named `py39`, install Python 3.9, NumPy v1.11 or above in it, and the latest stable version of SciPy. Say yes to all confirmations: -`conda create {{[-ny|--name --yes]}} {{py39}} python={{3.9}} "{{numpy>=1.11 scipy}}"` +`conda create {{[-ny|--name --yes]}} py39 python=3.9 "numpy>=1.11 scipy"` - Create a new environment named `myenv` and install packages listed in files: `conda create {{[-n|--name]}} myenv --file {{file1.yml}} --file {{file2.yml}}` -- Create a new environment named `myenv` at custom path (i.e. prefix): +- Create a new environment at a custom path (i.e. prefix): `conda create {{[-p|--prefix]}} {{path/to/myenv}}` diff --git a/tldr/git-commit b/tldr/git-commit index 184657cf..85de1e86 100644 --- a/tldr/git-commit +++ b/tldr/git-commit @@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git `git commit {{[-m|--message]}} "{{message}}" --allow-empty` -- Add a description in addition to the commit message: +- Create a commit with a message and a description: `git commit {{[-m|--message]}} "{{message}}" {{[-m|--message]}} "{{description}}"` diff --git a/tldr/linux/deluser b/tldr/linux/deluser index 44f95f55..7fcb411d 100644 --- a/tldr/linux/deluser +++ b/tldr/linux/deluser @@ -23,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Remove a user, and all files owned by them: `sudo deluser --remove-all-files {{username}}` + +- Remove a user from a group, without deleting the user: + +`sudo deluser {{username}} {{group}}` diff --git a/tldr/linux/sed b/tldr/linux/sed index fcc1b3b3..c61a6a16 100644 --- a/tldr/linux/sed +++ b/tldr/linux/sed @@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - [d]elete lines 1 to 5 of a file and back up the original file with a `.orig` extension: -`sed {{[-i|--in-place=]}}{{.orig}} '1,5d' {{path/to/file}}` +`sed {{[-i|--in-place=]}}.orig '1,5d' {{path/to/file}}` - [p]rint only the first line to `stdout`: diff --git a/tldr/linux/virt-sparsify b/tldr/linux/virt-sparsify index fb1300a3..800bbce3 100644 --- a/tldr/linux/virt-sparsify +++ b/tldr/linux/virt-sparsify @@ -11,8 +11,12 @@ source: https://github.com/tldr-pages/tldr.git - Create a sparsified compressed image without snapshots from an unsparsified one: -`virt-sparsify --compress {{path/to/image.qcow2}} {{path/to/image_new.qcow2}}` +`virt-sparsify --compress {{path/to/image.qcow2}} {{path/to/new_image.qcow2}}` - Sparsify an image in-place: `virt-sparsify --in-place {{path/to/image.img}}` + +- Convert from one image format to another: + +`virt-sparsify {{path/to/image}} --convert {{qcow2|raw|vdi|...}} {{path/to/new_image}}` diff --git a/tldr/mpicc b/tldr/mpicc index 15693230..ffd85ba9 100644 --- a/tldr/mpicc +++ b/tldr/mpicc @@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git - Compile a source code file into an object file: -`mpicc -c {{path/to/file.c}}` +`mpicc -c {{path/to/file}}.c` - Link an object file and make an executable: -`mpicc -o {{executable}} {{path/to/object_file.o}}` +`mpicc -o {{executable}} {{path/to/object_file}}.o` - Compile and link source code in a single command: -`mpicc -o {{executable}} {{path/to/file.c}}` +`mpicc -o {{executable}} {{path/to/file}}.c` diff --git a/tldr/mpijavac b/tldr/mpijavac index ab88c711..fb7250f8 100644 --- a/tldr/mpijavac +++ b/tldr/mpijavac @@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git - Compile a Java source file: -`mpijavac {{path/to/source_file.java}}` +`mpijavac {{path/to/source_file}}.java` - Pass application-specific classpaths to compiler: -`mpijavac -cp {{path/to/app.jar}} {{path/to/source_file.java}}` +`mpijavac -cp {{path/to/app}}.jar {{path/to/source_file}}.java` - Show the flags necessary to build MPI Java applications: @@ -27,4 +27,4 @@ source: https://github.com/tldr-pages/tldr.git - Show full invoked Java compiler command line: -`mpijavac {{path/to/source_file.java}} --showme` +`mpijavac {{path/to/source_file}}.java --showme` diff --git a/tldr/notify-send b/tldr/notify-send index 2266e918..47cd52c7 100644 --- a/tldr/notify-send +++ b/tldr/notify-send @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Show a notification with the title "Test" and the content "This is a test": -`notify-send "{{Test}}" "{{This is a test}}"` +`notify-send "Test" "This is a test"` - Show a notification with a custom icon: diff --git a/tldr/pgrep b/tldr/pgrep index 6c3e05a4..a9f1af74 100644 --- a/tldr/pgrep +++ b/tldr/pgrep @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Search for processes run by a specific user: -`pgrep {{[-u|--euid]}} root {{process_name}}` +`pgrep {{[-u|--euid]}} {{username}} {{process_name}}` diff --git a/tldr/set b/tldr/set index 0f046c5d..63272ebe 100644 --- a/tldr/set +++ b/tldr/set @@ -22,11 +22,11 @@ source: https://github.com/tldr-pages/tldr.git - Write and edit text in the command-line with `vi`-like keybindings (e.g. `yy`): -`set -o {{vi}}` +`set -o vi` -- Return to default mode: +- Return to default (`emacs`) mode: -`set -o {{emacs}}` +`set -o emacs` - List all modes: