Skip to content

Commit

Permalink
Data update 2023-09-12 18-12-43
Browse files Browse the repository at this point in the history
  • Loading branch information
1010bots committed Sep 12, 2023
1 parent af1a501 commit 16c82df
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 16 deletions.
22 changes: 22 additions & 0 deletions docs/en/common/cargo-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: page
title: common/cargo-help (English)
description: "Display help on `cargo` and its subcommands."
content_hash: 60923c4d270fa767a18fda5b4a1450fe2a92e546
last_modified_at: 2023-09-12
---

This entry is very new in the [tldr-pages](https://github.com/tldr-pages/tldr) project, hence translation data is currently unavailable for a while.

<hr># cargo help

Display help on `cargo` and its subcommands.
More information: <https://doc.rust-lang.org/cargo/commands/cargo-help.html>.

- Display general help:

`cargo help`

- Display help for a subcommand:

`cargo help `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">subcommand</span>
22 changes: 22 additions & 0 deletions docs/en/common/cargo-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
layout: page
title: common/cargo-version (English)
description: "Display `cargo` version information."
content_hash: 8ebb6c63016e9dd1f79023671186675841b7b891
last_modified_at: 2023-09-12
---

This entry is very new in the [tldr-pages](https://github.com/tldr-pages/tldr) project, hence translation data is currently unavailable for a while.

<hr># cargo version

Display `cargo` version information.
More information: <https://doc.rust-lang.org/cargo/commands/cargo-version.html>.

- Display the version of `cargo`:

`cargo version`

- Display additional build information:

`cargo version --verbose`
46 changes: 46 additions & 0 deletions docs/en/common/eza.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: page
title: common/eza (English)
description: "Modern, maintained replacement for `ls`, built on `exa`."
content_hash: 54bf1d28eaba2bd528a518178a6d11d75e721ce8
last_modified_at: 2023-09-12
---

This entry is very new in the [tldr-pages](https://github.com/tldr-pages/tldr) project, hence translation data is currently unavailable for a while.

<hr># eza

Modern, maintained replacement for `ls`, built on `exa`.
More information: <https://github.com/eza-community/eza>.

- List files one per line:

`eza --oneline`

- List all files, including hidden files:

`eza --all`

- Long format list (permissions, ownership, size and modification date) of all files:

`eza --long --all`

- List files with the largest at the top:

`eza --reverse --sort=`<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">size</span>

- Display a tree of files, three levels deep:

`eza --long --tree --level=`<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">3</span>

- List files sorted by modification date (oldest first):

`eza --long --sort=`<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">modified</span>

- List files with their headers, icons, and Git statuses:

`eza --long --header --icons --git`

- Don't list files mentioned in `.gitignore`:

`eza --git-ignore`
31 changes: 16 additions & 15 deletions docs/en/linux/iptables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
layout: page
title: linux/iptables (English)
description: "Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall."
content_hash: b6fac6d0773f4539158095885c9248ee3726ec57
content_hash: a01188b55ee839046d3c5241732e2508d38dde33
last_modified_at: 2023-09-12
related_topics:
- title: italiano version
url: /it/linux/iptables.html
Expand All @@ -16,34 +17,34 @@ related_topics:
Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall.
More information: <https://www.netfilter.org/projects/iptables/>.

- View chains, rules, and packet/byte counters for the filter table:
- View chains, rules, packet/byte counters and line numbers for the filter table:

`sudo iptables -vnL`
`sudo iptables --verbose --numeric --list --line-numbers`

- Set chain policy rule:
- Set chain [P]olicy rule:

`sudo iptables -P `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule</span>
`sudo iptables --policy `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule</span>

- Append rule to chain policy for IP:
- [A]ppend rule to chain policy for IP:

`sudo iptables -A `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` -s `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">ip</span>` -j `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule</span>
`sudo iptables --append `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` --source `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">ip</span>` --jump `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule</span>

- Append rule to chain policy for IP considering protocol and port:
- [A]ppend rule to chain policy for IP considering [p]rotocol and port:

`sudo iptables -A `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` -s `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">ip</span>` -p `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">protocol</span>` --dport `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">port</span>` -j `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule</span>
`sudo iptables --append `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` --source `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">ip</span>` --protocol `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">protocol</span>` --dport `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">port</span>` --jump `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule</span>

- Add a NAT rule to translate all traffic from the `192.168.0.0/24` subnet to the host's public IP:

`sudo iptables -t `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">nat</span>` -A `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">POSTROUTING</span>` -s `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">192.168.0.0/24</span>` -j `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">MASQUERADE</span>
`sudo iptables --table `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">nat</span>` --append `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">POSTROUTING</span>` --source `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">192.168.0.0/24</span>` --jump `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">MASQUERADE</span>

- Delete chain rule:
- [D]elete chain rule:

`sudo iptables -D `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule_line_number</span>
`sudo iptables --delete `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">chain</span>` `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">rule_line_number</span>

- Save iptables configuration of a given table to a file:
- Save `iptables` configuration of a given [t]able to a file:

`sudo iptables-save -t `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">tablename</span>` > `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">path/to/iptables_file</span>
`sudo iptables-save --table `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">tablename</span>` > `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">path/to/iptables_file</span>

- Restore iptables configuration from a file:
- Restore `iptables` configuration from a file:

`sudo iptables-restore < `<span class="tldr-var badge badge-pill bg-dark-lm bg-white-dm text-white-lm text-dark-dm font-weight-bold">path/to/iptables_file</span>
2 changes: 1 addition & 1 deletion source

0 comments on commit 16c82df

Please sign in to comment.