Skip to content

Commit ac6eaea

Browse files
committed
Improve command quality
1 parent 18a291a commit ac6eaea

132 files changed

Lines changed: 2528 additions & 1384 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/commands/apptainer-exec.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Execute a command within an Apptainer container.
2222

2323
**Execute from Docker Hub** image
2424

25-
```apptainer exec docker://[ubuntu:latest] [cat /etc/os-release]```
25+
```apptainer exec docker://[image:tag] [command]```
2626

2727
**Run with isolated network**
2828

@@ -32,9 +32,9 @@ Execute a command within an Apptainer container.
3232

3333
```apptainer exec --env [VAR=value] [container.sif] [command]```
3434

35-
**Run with all host filesystems bound**
35+
**Run in a writable sandbox directory**
3636

37-
```apptainer exec --bind /:/host:ro [container.sif] [command]```
37+
```apptainer exec --writable [sandbox/] [command]```
3838

3939
# SYNOPSIS
4040

@@ -58,7 +58,7 @@ Execute a command within an Apptainer container.
5858
> Use minimal /dev and empty other directories.
5959
6060
**--containall**, **-C**
61-
> Full isolation: contain plus clean environment and no PID namespace.
61+
> Full isolation: contain filesystems plus new PID and IPC namespaces and clean environment.
6262
6363
**--cleanenv**, **-e**
6464
> Clean environment before running container.
@@ -72,8 +72,8 @@ Execute a command within an Apptainer container.
7272
**--home** _path_
7373
> Set custom home directory.
7474
75-
**--pwd** _path_
76-
> Set initial working directory in container.
75+
**--cwd** _path_
76+
> Set initial working directory in container. (**--pwd** is a deprecated synonym.)
7777
7878
**--net**
7979
> Enable network namespace.
@@ -88,7 +88,37 @@ Execute a command within an Apptainer container.
8888
> Add writable tmpfs overlay.
8989
9090
**--no-mount** _type_
91-
> Disable specific mount (proc, sys, dev, devpts, home, tmp, cwd).
91+
> Disable a specific mount point. Valid values: proc, sys, dev, devpts, home, tmp, hostfs, cwd.
92+
93+
**--no-home**
94+
> Do not mount the user's home directory into the container.
95+
96+
**--writable**, **-w**
97+
> Make the container filesystem read-write (requires a writable image or sandbox directory).
98+
99+
**--scratch**, **-S** _dir_
100+
> Include a scratch directory within the container that is linked to a temporary directory on the host.
101+
102+
**--workdir**, **-W** _path_
103+
> Working directory used for /tmp, /var/tmp, and $HOME overrides when using **--contain** or **--scratch**.
104+
105+
**--ipc**, **-i**
106+
> Run container in a new IPC namespace.
107+
108+
**--pid**, **-p**
109+
> Run container in a new PID namespace.
110+
111+
**--userns**, **-u**
112+
> Run container in a new user namespace.
113+
114+
**--uts**
115+
> Run container in a new UTS namespace.
116+
117+
**--no-eval**
118+
> Do not shell-evaluate environment variables or OCI CMD/ENTRYPOINT.
119+
120+
**--fusemount** _spec_
121+
> Mount a FUSE filesystem inside the container using the format: _type:fuse_command container_path_.
92122
93123
# DESCRIPTION
94124

@@ -115,4 +145,4 @@ Apptainer is the continuation of the **Singularity** project after it joined the
115145

116146
# SEE ALSO
117147

118-
[apptainer](/man/apptainer)(1), [apptainer-shell](/man/apptainer-shell)(1), [apptainer-run](/man/apptainer-run)(1), [apptainer-build](/man/apptainer-build)(1), [apptainer-pull](/man/apptainer-pull)(1), [docker](/man/docker)(1)
148+
[apptainer](/man/apptainer)(1), [apptainer-shell](/man/apptainer-shell)(1), [apptainer-run](/man/apptainer-run)(1), [apptainer-build](/man/apptainer-build)(1), [apptainer-pull](/man/apptainer-pull)(1), [apptainer-overlay](/man/apptainer-overlay)(1), [docker](/man/docker)(1)

assets/commands/arping.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ Send ARP requests to discover and test network hosts
44

55
# TLDR
66

7-
**Ping** host using ARP
7+
**Ping a host using ARP**
88

99
```sudo arping [192.168.1.1]```
1010

11-
Ping with **specific interface**
11+
**Ping using a specific interface**
1212

1313
```sudo arping -I [eth0] [192.168.1.1]```
1414

15-
Send **count** requests
15+
**Send a specific number of requests**
1616

1717
```sudo arping -c [5] [192.168.1.1]```
1818

19-
**Detect duplicate** IP addresses
19+
**Detect duplicate IP addresses on the network**
2020

2121
```sudo arping -D [192.168.1.1]```
2222

23-
Find **MAC address** of IP
23+
**Quit after first reply** (check if host is alive)
2424

25-
```sudo arping -c 1 [192.168.1.1]```
25+
```sudo arping -f [192.168.1.1]```
2626

2727
# SYNOPSIS
2828

assets/commands/ascii-image-converter.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
# TAGLINE
22

3-
Transform images into ASCII art for terminal display.
3+
Transform images into ASCII art for terminal display
44

55
# TLDR
66

7-
**Convert** image to ASCII
7+
**Convert image to ASCII art**
88

99
```ascii-image-converter [image.png]```
1010

11-
Convert with **color**
11+
**Convert with color output**
1212

1313
```ascii-image-converter -C [image.png]```
1414

15-
Convert with **specific width**
15+
**Convert with specific width**
1616

1717
```ascii-image-converter -W [80] [image.png]```
1818

19-
Save to **file**
19+
**Convert using braille characters**
2020

21-
```ascii-image-converter [image.png] > [output.txt]```
21+
```ascii-image-converter -b [image.png]```
2222

23-
Use **custom character map** (darkest to lightest)
23+
**Use a custom character map** (darkest to lightest)
2424

2525
```ascii-image-converter -m " .:-=+*#%@" [image.png]```
2626

27-
Convert using **braille** characters
28-
29-
```ascii-image-converter -b [image.png]```
30-
31-
Set **specific dimensions** (width,height)
27+
**Fit output to terminal width**
3228

33-
```ascii-image-converter -d [80],[40] [image.png]```
29+
```ascii-image-converter -f [image.png]```
3430

35-
Save as **PNG image**
31+
**Save output as PNG image**
3632

3733
```ascii-image-converter -s [output_dir] -C [image.png]```
3834

assets/commands/avahi-publish-address.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ Register mDNS hostname-to-address mappings
4040
**-d, --domain=**_DOMAIN_
4141
> Specify mDNS domain name to register in (defaults to .local)
4242
43-
**-P, --proto=**_PROTO_
44-
> Specify IP protocol to publish (ipv4, ipv6, or all)
45-
4643
**-R, --no-reverse**
4744
> Do not publish reverse DNS (PTR) entry for the address
4845
@@ -63,7 +60,7 @@ The tool enables local network name resolution by advertising a hostname and its
6360

6461
When invoked, **avahi-publish-address** connects to the Avahi daemon and maintains the hostname-to-address mapping until the process is terminated. The mapping is automatically withdrawn when the process exits.
6562

66-
By default, the tool publishes both forward (name-to-address) and reverse (address-to-name) DNS entries. The reverse entry can be suppressed using the **--no-reverse** option. The protocol can be explicitly specified using **--proto** when needed, though the tool automatically detects the protocol from the address format.
63+
By default, the tool publishes both forward (name-to-address) and reverse (address-to-name) DNS entries. The reverse entry can be suppressed using the **--no-reverse** option. The protocol (IPv4 or IPv6) is automatically determined from the address format.
6764

6865
The published hostname becomes discoverable by other mDNS-capable devices on the local network segment, including Linux systems with Avahi, macOS systems with Bonjour, and Windows systems with appropriate mDNS support.
6966

assets/commands/b2-tools.md

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,76 @@
11
# TAGLINE
22

3-
Utilities for Backblaze B2 cloud storage operations.
3+
Official Backblaze B2 cloud storage command-line tool
44

55
# TLDR
66

7-
**Upload** to B2
7+
**Authorize account**
88

9-
```b2-upload [bucketName] [file]```
9+
```b2 account authorize [applicationKeyId] [applicationKey]```
1010

11-
**Download** from B2
11+
**Upload a file to a bucket**
1212

13-
```b2-download [bucketName] [fileName] [destination]```
13+
```b2 file upload [bucketName] [localFile] [remoteName]```
1414

15-
**List** files
15+
**Download a file from a bucket**
1616

17-
```b2-list [bucketName]```
17+
```b2 file download [b2://bucketName/fileName] [localPath]```
18+
19+
**List files in a bucket**
20+
21+
```b2 ls [bucketName]```
22+
23+
**Create a new bucket**
24+
25+
```b2 bucket create [bucketName] [allPrivate]```
26+
27+
**Sync a local directory to B2**
28+
29+
```b2 sync [localDir] b2://[bucketName]/[prefix]```
1830

1931
# SYNOPSIS
2032

21-
**b2-tools** utilities for Backblaze B2
33+
**b2** _command_ [_options_]
34+
35+
# PARAMETERS
36+
37+
**account authorize** _keyID_ _key_
38+
> Authorize with B2 using application key.
39+
40+
**file upload** _bucket_ _local_ _remote_
41+
> Upload a file to a bucket.
42+
43+
**file download** _uri_ _local_
44+
> Download a file from B2.
45+
46+
**ls** _bucket_
47+
> List files in a bucket.
48+
49+
**bucket create** _name_ _type_
50+
> Create a bucket (allPrivate or allPublic).
51+
52+
**bucket delete** _name_
53+
> Delete a bucket.
54+
55+
**sync** _source_ _destination_
56+
> Synchronize files between local and B2 or between B2 buckets.
57+
58+
**file hide** _bucket_ _file_
59+
> Hide a file (soft delete).
2260
2361
# DESCRIPTION
2462

25-
**b2-tools** is a collection of utilities for interacting with Backblaze B2 Cloud Storage. It provides simplified wrappers around common B2 operations for backup and file management.
63+
**b2-tools** (invoked as **b2**) is the official command-line tool for Backblaze B2 Cloud Storage. It provides file upload, download, sync, and bucket management operations for B2's S3-compatible object storage.
2664

27-
The tools offer convenience functions built on top of the official B2 CLI.
65+
The sync command efficiently mirrors local directories to B2, uploading only changed files. B2 provides affordable cloud storage with free egress through Cloudflare's bandwidth alliance.
2866

2967
# CAVEATS
3068

31-
Less actively maintained than official b2 CLI. May not support all B2 features. Consider using official b2 command instead.
69+
Requires application key authorization before use. Large file uploads are automatically split into parts. The sync command compares by SHA1 hash, so the first sync of large directories can be slow. B2-native URIs use the `b2://` prefix.
3270

3371
# HISTORY
3472

35-
**b2-tools** was created as a community project to simplify B2 operations before the official CLI matured.
73+
**b2-tools** is the official CLI developed by **Backblaze** for their B2 Cloud Storage service. It was open-sourced on GitHub and is installable via pip as `b2`.
3674

3775
# SEE ALSO
3876

assets/commands/blkdiscard.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,56 @@ Discard sectors on a storage device
1212

1313
```blkdiscard -s /dev/device```
1414

15-
Discard first **100 MB**
15+
Discard first **100 MiB**
1616

17-
```blkdiscard -l 100MB /dev/device```
17+
```blkdiscard -l 100M /dev/device```
18+
19+
Discard in **512 MiB** steps (avoids long uninterruptible operations)
20+
21+
```blkdiscard -p 512M /dev/device```
1822

1923
# SYNOPSIS
2024

2125
**blkdiscard** [_OPTIONS_] _device_
2226

2327
# DESCRIPTION
2428

25-
**blkdiscard** sends TRIM/DISCARD commands to a storage device to mark sectors as unused. This is particularly useful for SSDs as it allows the drive to optimize its internal storage and improve write performance.
29+
**blkdiscard** sends TRIM/DISCARD commands to a block device to mark sectors as unused. Unlike **fstrim**(8), it operates directly on the block device rather than a mounted filesystem. This is particularly useful for SSDs and thinly-provisioned storage. All data in the discarded region will be lost.
2630

2731
# PARAMETERS
2832

33+
**-o, --offset** _offset_
34+
> Byte offset into the device to start discarding. Must be aligned to the device sector size. Default is 0.
35+
2936
**-l, --length** _size_
30-
> Number of bytes to discard from the offset
37+
> Number of bytes to discard from the offset. Must be aligned to the device sector size.
3138
32-
**-o, --offset** _offset_
33-
> Byte offset into the device to start discarding
39+
**-p, --step** _size_
40+
> Discard this many bytes per iteration instead of all at once. Useful for avoiding long uninterruptible operations on large devices.
3441
3542
**-s, --secure**
36-
> Perform a secure discard (hardware must support this)
43+
> Perform a secure discard. This tells the device to also erase any copies of the discarded data (e.g. in garbage collection). Requires device support.
3744
3845
**-z, --zeroout**
39-
> Zero-fill rather than discard
46+
> Zero-fill the specified region rather than discarding it.
4047
4148
**-f, --force**
42-
> Disable all checking
49+
> Disable exclusive-open check, allowing operation on mounted devices. Use with caution.
50+
51+
**-q, --quiet**
52+
> Suppress warning messages.
4353
4454
**-v, --verbose**
45-
> Print aligned offset and length
55+
> Print aligned offset and length values and progress information.
4656
4757
# CAVEATS
4858

49-
This operation destroys data and is irreversible. Not all devices support discard operations. Secure discard requires hardware support and may not be more secure than regular discard on all devices. The device must not be mounted.
59+
This operation destroys data and is irreversible. All data in the discarded region is lost. Not all devices support discard operations; on unsupported devices, blkdiscard exits with status 2 (since util-linux 2.39). Secure discard requires explicit hardware support and may not provide stronger guarantees than regular discard on all devices.
5060

5161
# HISTORY
5262

5363
**blkdiscard** is part of the **util-linux** package, providing SSD optimization and secure erase functionality.
5464

5565
# SEE ALSO
5666

57-
[fstrim](/man/fstrim)(8), [hdparm](/man/hdparm)(8), [blkid](/man/blkid)(8)
67+
[fstrim](/man/fstrim)(8), [hdparm](/man/hdparm)(8), [wipefs](/man/wipefs)(8), [blkid](/man/blkid)(8)

0 commit comments

Comments
 (0)