Skip to content

Commit

Permalink
netplan: add page; hash, hostname, zip, tar, touch: add Farsi transla…
Browse files Browse the repository at this point in the history
…tion (#15763)

Co-authored-by: Juri Dispan <[email protected]>
  • Loading branch information
AsbDaryaee and gutjuri authored Mar 7, 2025
1 parent 0b0841e commit 4cc711e
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pages.fa/common/hash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# hash

> مشاهده مکان‌های ذخیره شده فایل‌های اجرایی در حافظه پنهان.
> اطلاعات بیشتر: <https://www.gnu.org/software/bash/manual/bash.html#index-hash>.
- مشاهده مکان‌های دستورات ذخیره شده برای پوسته فعلی:

`hash`

- پاک کردن جدول هش:

`hash -r`

- حذف یک دستور خاص از جدول هش:

`hash -d {{command}}`

- نمایش مسیر کامل `command`:

`hash -t {{command}}`
24 changes: 24 additions & 0 deletions pages.fa/common/hostname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# hostname

> نمایش یا تنظیم نام میزبان سیستم.
> اطلاعات بیشتر: <https://manned.org/hostname>.
- نمایش نام میزبان فعلی:

`hostname`

- نمایش آدرس شبکه نام میزبان:

`hostname -i`

- نمایش تمام آدرس‌های شبکه میزبان:

`hostname -I`

- نمایش FQDN (نام دامنه کامل):

`hostname --fqdn`

- تنظیم نام میزبان فعلی:

`hostname {{new_hostname}}`
37 changes: 37 additions & 0 deletions pages.fa/common/tar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# tar

> ابزار آرشیو کردن.
> اغلب با یک روش فشرده‌سازی مانند `gzip` یا `bzip2` ترکیب می‌شود.
> اطلاعات بیشتر: <https://www.gnu.org/software/tar>.
- [c]ایجاد یک آرشیو و نوشتن آن در یک [f]فایل:

`tar cf {{path/to/target.tar}} {{path/to/file1 path/to/file2 ...}}`

- [c]ایجاد یک آرشیو g[z]ip شده و نوشتن آن در یک [f]فایل:

`tar czf {{path/to/target.tar.gz}} {{path/to/file1 path/to/file2 ...}}`

- [c]ایجاد یک آرشیو g[z]ip شده (فشرده) از یک پوشه با استفاده از مسیرهای نسبی:

`tar czf {{path/to/target.tar.gz}} --directory={{path/to/directory}} .`

- استخراج [x] یک آرشیو (فشرده) [f]فایل در پوشه فعلی به صورت [v]کامل:

`tar xvf {{path/to/source.tar[.gz|.bz2|.xz]}}`

- استخراج [x] یک آرشیو (فشرده) [f]فایل در پوشه مقصد:

`tar xf {{path/to/source.tar[.gz|.bz2|.xz]}} --directory={{path/to/directory}}`

- [c]ایجاد یک آرشیو فشرده و نوشتن آن در یک [f]فایل، با استفاده از پسوند فایل برای تعیین [a]خودکار برنامه فشرده‌سازی:

`tar caf {{path/to/target.tar.xz}} {{path/to/file1 path/to/file2 ...}}`

- نمایش [t] محتویات یک فایل [f]tar به صورت [v]کامل:

`tar tvf {{path/to/source.tar}}`

- استخراج [x] فایل‌های منطبق با یک الگو از یک آرشیو [f]فایل:

`tar xf {{path/to/source.tar}} --wildcards "{{*.html}}"`
20 changes: 20 additions & 0 deletions pages.fa/common/touch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# touch

> ایجاد فایل‌ها و تنظیم زمان‌های دسترسی/تغییر.
> اطلاعات بیشتر: <https://manned.org/touch>.
- ایجاد فایل‌های مشخص:

`touch {{path/to/file1 path/to/file2 ...}}`

- تنظیم زمان [a]دسترسی یا [m]تغییر فایل به زمان فعلی و عدم [c]ایجاد فایل در صورت عدم وجود:

`touch -c -{{a|m}} {{path/to/file1 path/to/file2 ...}}`

- تنظیم [t]زمان فایل به یک مقدار مشخص و عدم [c]ایجاد فایل در صورت عدم وجود:

`touch -c -t {{YYYYMMDDHHMM.SS}} {{path/to/file1 path/to/file2 ...}}`

- تنظیم زمان فایل‌ها به زمان فایل [r]مرجع، و عدم [c]ایجاد فایل در صورت عدم وجود:

`touch -c -r {{path/to/reference_file}} {{path/to/file1 path/to/file2 ...}}`
33 changes: 33 additions & 0 deletions pages.fa/common/zip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# zip

> بسته‌بندی و فشرده‌سازی (آرشیو) فایل‌ها در یک آرشیو Zip.
> همچنین ببینید: `unzip`.
> اطلاعات بیشتر: <https://manned.org/zip>.
- افزودن فایل‌ها/پوشه‌ها به یک آرشیو مشخص (به صورت بازگشتی):

`zip -r {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`

- حذف فایل‌ها/پوشه‌ها از یک آرشیو مشخص:

`zip -d {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`

- آرشیو فایل‌ها/پوشه‌ها با مستثنی کردن موارد مشخص شده:

`zip -r {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} -x {{path/to/excluded_files_or_directories}}`

- آرشیو فایل‌ها/پوشه‌ها با سطح فشرده‌سازی مشخص (`0` - کمترین، `9` - بیشترین):

`zip -r -{{0..9}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`

- ایجاد یک آرشیو رمزگذاری شده با رمز عبور مشخص:

`zip -r -e {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`

- آرشیو فایل‌ها/پوشه‌ها در یک آرشیو چند بخشی تقسیم شده (مثلاً بخش‌های ۳ گیگابایتی):

`zip -r -s {{3g}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`

- نمایش محتویات یک آرشیو مشخص:

`zip -sf {{path/to/compressed.zip}}`
28 changes: 28 additions & 0 deletions pages/linux/netplan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# netplan

> Network configuration utility using YAML.
> More information: <https://netplan.io/>.
- Apply a network configuration and make it persistent:

`sudo netplan apply`

- Generate backend configuration files:

`sudo netplan generate`

- Configure a network interface to use DHCP:

`sudo netplan set ethernets.{{interface_name}}.dhcp4=true`

- Try configuration changes without applying them permanently:

`sudo netplan try --timeout={{seconds}}`

- Return to previous working configuration after failed apply:

`sudo netplan --debug apply`

- Display the current netplan configuration status:

`netplan status`

0 comments on commit 4cc711e

Please sign in to comment.