diff --git a/tldr/createdb b/tldr/createdb index c97141b9..1779f004 100644 --- a/tldr/createdb +++ b/tldr/createdb @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - Create a database owned by a specific user with a description: -`createdb --owner {{username}} {{database_name}} '{{description}}'` +`createdb {{[-O|--owner]}} {{username}} {{database_name}} '{{description}}'` - Create a database from a template: -`createdb --template {{template_name}} {{database_name}}` +`createdb {{[-T|--template]}} {{template_name}} {{database_name}}` diff --git a/tldr/git-fetch b/tldr/git-fetch index 9c4813e8..fb53581e 100644 --- a/tldr/git-fetch +++ b/tldr/git-fetch @@ -27,3 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Delete local references to remote branches that have been deleted upstream: `git fetch {{[-p|--prune]}}` + +- Deepen current shallow branch by 2 commits: + +`git fetch --deepen 2` diff --git a/tldr/linux/lvscan b/tldr/linux/lvscan new file mode 100644 index 00000000..20e4ea44 --- /dev/null +++ b/tldr/linux/lvscan @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lvscan + +> Scan (list) all logical volumes in the system. +> Part of the LVM (Logical Volume Manager) suite. +> More information: . + +- List all logical volumes: + +`lvscan` + +- List only active logical volumes: + +`lvscan --active` + +- List only inactive logical volumes: + +`lvscan --inactive` + +- Display logical volumes in JSON format: + +`lvscan --reportformat json` diff --git a/tldr/linux/xdp-filter b/tldr/linux/xdp-filter new file mode 100644 index 00000000..855fda81 --- /dev/null +++ b/tldr/linux/xdp-filter @@ -0,0 +1,34 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# xdp-filter + +> Load and manage an eBPF XDP packet filter. +> Part of the xdp-tools collection. +> More information: . + +- Load the filter on an interface in skb (generic) mode with default allow policy: + +`sudo xdp-filter load {{[-p|--policy]}} allow {{[-m|--mode]}} skb {{network_interface}}` + +- Unload the filter from an interface: + +`sudo xdp-filter unload {{network_interface}}` + +- Deny traffic to a specific destination port: + +`sudo xdp-filter port {{destination_port}}` + +- Deny traffic from a specific source IP address: + +`sudo xdp-filter ip {{[-m|--mode]}} src {{source_ip}}` + +- Deny traffic from a specific source MAC address: + +`sudo xdp-filter ether {{[-m|--mode]}} src {{mac_address}}` + +- Poll packets and show statistics every 10000 milliseconds: + +`sudo xdp-filter poll {{[-i|--interval]}} 10000` diff --git a/tldr/psql b/tldr/psql index 703c6e4b..339fb89a 100644 --- a/tldr/psql +++ b/tldr/psql @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Execute commands from a file on the given database: -`psql {{database}} {{[-f|--file]}} {{file.sql}}` +`psql {{database}} {{[-f|--file]}} {{path/to/file.sql}}` diff --git a/tldr/rdiff-backup b/tldr/rdiff-backup new file mode 100644 index 00000000..04c40409 --- /dev/null +++ b/tldr/rdiff-backup @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# rdiff-backup + +> Local/remote mirror and incremental backup tool. +> More information: . + +- Back up `path/to/source` to `path/to/backup`: + +`rdiff-backup backup {{path/to/source}} {{path/to/backup}}` + +- List incremental backups in repository (location path, local or remote): + +`rdiff-backup list increments {{repository}}` + +- Restore from most recent backup: + +`rdiff-backup restore {{path/to/backup}} {{path/to/destination}}` + +- Restore backed up files as they were 3 days ago: + +`rdiff-backup restore --at 3D {{path/to/backup}} {{path/to/destination}}`