diff --git a/tldr/docker-ps b/tldr/docker-ps index 0937b43b..e58bd4cd 100644 --- a/tldr/docker-ps +++ b/tldr/docker-ps @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # docker ps > List Docker containers. -> More information: . +> More information: . - List currently running Docker containers: diff --git a/tldr/git-commit b/tldr/git-commit index b01af49b..a6c3e96d 100644 --- a/tldr/git-commit +++ b/tldr/git-commit @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Commit only specific (already staged) files: -`git commit {{path/to/file1}} {{path/to/file2}}` +`git commit {{path/to/file1 path/to/file2 ...}}` - Create a commit, even if there are no staged files: diff --git a/tldr/linux/audit2allow b/tldr/linux/audit2allow new file mode 100644 index 00000000..e5a10b41 --- /dev/null +++ b/tldr/linux/audit2allow @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# audit2allow + +> Create an SELinux local policy module to allow rules based on denied operations found in logs. +> Note: Use audit2allow with caution—always review the generated policy before applying it, as it may allow excessive access. +> More information: . + +- Generate a local policy to allow access for all denied services: + +`sudo audit2allow --all -M {{local_policy_name}}` + +- Generate a local policy module to grant access to a specific process/service/command from the audit logs: + +`sudo grep {{apache2}} /var/log/audit/audit.log | sudo audit2allow -M {{local_policy_name}}` + +- Inspect and review the Type Enforcement (.te) file for a local policy: + +`vim {{local_policy_name}}.te` + +- Install a local policy module: + +`sudo semodule -i {{local_policy_name}}.pp` diff --git a/tldr/linux/quickget b/tldr/linux/quickget index b66ed354..e407ee62 100644 --- a/tldr/linux/quickget +++ b/tldr/linux/quickget @@ -24,16 +24,20 @@ source: https://github.com/tldr-pages/tldr.git - Download a macOS recovery image and creates a virtual machine configuration: -`quickget macos {{high-sierra|mojave|catalina|big-sur|monterey|ventura}}` +`quickget macos {{mojave|catalina|big-sur|monterey|ventura|sonoma}}` -- Show an ISO URL for an operating system (Note: it does not work for Windows): +- Show an ISO URL for an operating system: -`quickget --show-iso-url fedora {{release}} {{edition}}` +`quickget --url fedora {{release}} {{edition}}` - Test if an ISO file is available for an operating system: -`quickget --test-iso-url nixos {{edition}} {{plasma5}}` +`quickget --check nixos {{release}} {{edition}}` -- Open an operating system distribution's homepage in a browser (Note: it does not work for Windows): +- Download an image without building any VM configuration: -`quickget --open-distro-homepage {{os}}` +`quickget --download {{os}} {{release}} {{edition}}` + +- Create a VM configuration for an OS image: + +`quickget --create-config {{os}} {{path/to/iso}}` diff --git a/tldr/linux/trash b/tldr/linux/trash index 4168a652..d6443617 100644 --- a/tldr/linux/trash +++ b/tldr/linux/trash @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Manage the trashcan/recycling bin. > More information: . -- Delete a file and send it to the trash: +- Send a file to the trash: `trash {{path/to/file}}` diff --git a/tldr/netcat b/tldr/netcat index 4719892f..4f4c0cd1 100644 --- a/tldr/netcat +++ b/tldr/netcat @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # netcat > This command is an alias of `nc`. +> More information: . - View documentation for the original command: diff --git a/tldr/npm b/tldr/npm index 9233e26f..0d683a96 100644 --- a/tldr/npm +++ b/tldr/npm @@ -9,9 +9,9 @@ source: https://github.com/tldr-pages/tldr.git > Manage Node.js projects and their module dependencies. > More information: . -- Interactively create a `package.json` file: +- Create a `package.json` file with default values (omit --yes to do it interactively): -`npm init` +`npm init {{-y|--yes}}` - Download all the packages listed as dependencies in `package.json`: @@ -23,11 +23,11 @@ source: https://github.com/tldr-pages/tldr.git - Download the latest version of a package and add it to the list of dev dependencies in `package.json`: -`npm install {{package_name}} --save-dev` +`npm install {{package_name}} {{-D|--save-dev}}` - Download the latest version of a package and install it globally: -`npm install --global {{package_name}}` +`npm install {{-g|--global}} {{package_name}}0` - Uninstall a package and remove it from the list of dependencies in `package.json`: @@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git - List top-level globally installed packages: -`npm list --global --depth={{0}}` +`npm list {{-g|--global}} --depth {{0}}` diff --git a/tldr/rubocop b/tldr/rubocop index cb3fd099..74c83a32 100644 --- a/tldr/rubocop +++ b/tldr/rubocop @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Check one or more specific files or directories: -`rubocop {{path/to/file}} {{path/to/directory}}` +`rubocop {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` - Write output to file: @@ -26,11 +26,11 @@ source: https://github.com/tldr-pages/tldr.git - Exclude a cop: -`rubocop --except {{cop_1}} {{cop_2}}` +`rubocop --except {{cop1 cop2 ...}}` - Run only specified cops: -`rubocop --only {{cop_1}} {{cop_2}}` +`rubocop --only {{cop1 cop2 ...}}` - Auto-correct files (experimental): diff --git a/tldr/trash-cli b/tldr/trash-cli index fefc9b67..f5c87594 100644 --- a/tldr/trash-cli +++ b/tldr/trash-cli @@ -5,25 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # trash-cli -> A command-line interface to the trashcan APIs. +> This command is an alias of `trash`. > More information: . -- Trash specific files and directories into the current trashcan: +- View documentation for the original command: -`trash-put {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` - -- Remove specific files from the current trashcan: - -`trash-rm {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` - -- Empty the current trashcan: - -`trash-empty` - -- List trashed files and directories in the current trashcan: - -`trash-list` - -- Restore a specific file or directory by a number from the displayed list from the current trashcan: - -`trash-restore` +`tldr trash`