You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Specify mDNS domain name to register in (defaults to .local)
42
42
43
-
**-P, --proto=**_PROTO_
44
-
> Specify IP protocol to publish (ipv4, ipv6, or all)
45
-
46
43
**-R, --no-reverse**
47
44
> Do not publish reverse DNS (PTR) entry for the address
48
45
@@ -63,7 +60,7 @@ The tool enables local network name resolution by advertising a hostname and its
63
60
64
61
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.
65
62
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.
67
64
68
65
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.
> Synchronize files between local and B2 or between B2 buckets.
57
+
58
+
**file hide**_bucket__file_
59
+
> Hide a file (soft delete).
22
60
23
61
# DESCRIPTION
24
62
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.
26
64
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.
28
66
29
67
# CAVEATS
30
68
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.
32
70
33
71
# HISTORY
34
72
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`.
Copy file name to clipboardExpand all lines: assets/commands/blkdiscard.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,46 +12,56 @@ Discard sectors on a storage device
12
12
13
13
```blkdiscard -s /dev/device```
14
14
15
-
Discard first **100 MB**
15
+
Discard first **100 MiB**
16
16
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```
18
22
19
23
# SYNOPSIS
20
24
21
25
**blkdiscard**[_OPTIONS_]_device_
22
26
23
27
# DESCRIPTION
24
28
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.
26
30
27
31
# PARAMETERS
28
32
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
+
29
36
**-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.
31
38
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.
34
41
35
42
**-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.
37
44
38
45
**-z, --zeroout**
39
-
> Zero-fill rather than discard
46
+
> Zero-fill the specified region rather than discarding it.
40
47
41
48
**-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.
43
53
44
54
**-v, --verbose**
45
-
> Print aligned offset and length
55
+
> Print aligned offset and length values and progress information.
46
56
47
57
# CAVEATS
48
58
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.
50
60
51
61
# HISTORY
52
62
53
63
**blkdiscard** is part of the **util-linux** package, providing SSD optimization and secure erase functionality.
0 commit comments