static const char * const cmd_help_usage[] = {
"btrfs help [--full]",
- "Dislay help information",
+ "Display help information",
"",
"--full display detailed help on every command",
NULL
const char * const cmd_chunk_recover_usage[] = {
"btrfs chunk-recover [options] <device>",
- "Recover the chunk tree by scaning the devices one by one.",
+ "Recover the chunk tree by scanning the devices one by one.",
"",
"-y Assume an answer of `yes' to all questions",
"-v Verbose mode",
}
static const char * const cmd_label_usage[] = {
- "btrfs filesystem label [<device>|<mountpoint>] [<newlabel>]",
+ "btrfs filesystem label [<device>|<mount_point>] [<newlabel>]",
"Get or change the label of a filesystem",
"With one argument, get the label of filesystem on <device>.",
"If <newlabel> is passed, set the filesystem label to <newlabel>.",
static const char * const cmd_inode_resolve_usage[] = {
"btrfs inspect-internal inode-resolve [-v] <inode> <path>",
"Get file system paths for the given inode",
+ "",
+ "-v verbose mode",
NULL
};
}
static const char *const cmd_start_replace_usage[] = {
- "btrfs replace start srcdev|devid targetdev [-Bfr] mount_point",
+ "btrfs replace start [-Bfr] <srcdev>|<devid> <targetdev> <mount_point>",
"Replace device of a btrfs filesystem.",
"On a live filesystem, duplicate the data to the target device which",
"is currently stored on the source device. If the source device is not",
"available anymore, or if the -r option is set, the data is built",
"only using the RAID redundancy mechanisms. After completion of the",
"operation, the source device is removed from the filesystem.",
- "If the srcdev is a numerical value, it is assumed to be the device id",
- "of the filesystem which is mounted at mount_point, otherwise it is",
+ "If the <srcdev> is a numerical value, it is assumed to be the device id",
+ "of the filesystem which is mounted at <mount_point>, otherwise it is",
"the path to the source device. If the source device is disconnected,",
- "from the system, you have to use the devid parameter format.",
- "The targetdev needs to be same size or larger than the srcdev.",
+ "from the system, you have to use the <devid> parameter format.",
+ "The <targetdev> needs to be same size or larger than the <srcdev>.",
"",
- "-r only read from srcdev if no other zero-defect mirror exists",
+ "-r only read from <srcdev> if no other zero-defect mirror exists",
" (enable this if your drive has lots of read errors, the access",
" would be very slow)",
- "-f force using and overwriting targetdev even if it looks like",
+ "-f force using and overwriting <targetdev> even if it looks like",
" containing a valid btrfs filesystem. A valid filesystem is",
" assumed if a btrfs superblock is found which contains a",
" correct checksum. Devices which are currently mounted are",
- " never allowed to be used as the targetdev",
+ " never allowed to be used as the <targetdev>",
"-B do not background",
NULL
};
}
static const char *const cmd_status_replace_usage[] = {
- "btrfs replace status mount_point [-1]",
+ "btrfs replace status [-1] <mount_point>",
"Print status and progress information of a running device replace",
"operation",
"",
- "-1 print once instead of print continously until the replace",
+ "-1 print once instead of print continuously until the replace",
" operation finishes (or is canceled)",
NULL
};
}
static const char *const cmd_cancel_replace_usage[] = {
- "btrfs replace cancel mount_point",
+ "btrfs replace cancel <mount_point>",
"Cancel a running device replace operation.",
NULL
};
"-v verbose",
"-i ignore errors",
"-o overwrite",
- "-t tree location",
+ "-t <location> tree location",
"-f <offset> filesystem location",
"-u <block> super mirror",
+ "-r <rootid> root objectid",
"-d find dir",
- "-l list roots",
+ "-l list tree roots",
"--path-regex <regex>",
" restore only filenames matching regex,",
" you have to use following syntax (possibly quoted):",
}
static const char * const cmd_scrub_start_usage[] = {
- "btrfs scrub start [-Bdqr] [-c ioprio_class -n ioprio_classdata] <path>|<device>",
+ "btrfs scrub start [-BdqrR] [-c ioprio_class -n ioprio_classdata] <path>|<device>",
"Start a new scrub",
"",
"-B do not background",
"-d stats per device (-B only)",
"-q be quiet",
"-r read only mode",
+ "-R raw print mode, print full data instead of summary"
"-c set ioprio class (see ionice(1) manpage)",
"-n set ioprio classdata (see ionice(1) manpage)",
NULL
}
static const char * const cmd_scrub_resume_usage[] = {
- "btrfs scrub resume [-Bdqr] [-c ioprio_class -n ioprio_classdata] <path>|<device>",
+ "btrfs scrub resume [-BdqrR] [-c ioprio_class -n ioprio_classdata] <path>|<device>",
"Resume previously canceled or interrupted scrub",
"",
"-B do not background",
};
const char * const cmd_send_usage[] = {
- "btrfs send [-ve] [-p <parent>] [-c <clone-src>] <subvol>",
+ "btrfs send [-ve] [-p <parent>] [-c <clone-src>] [-f <outfile>] <subvol>",
"Send the subvolume to stdout.",
"Sends the subvolume specified by <subvol> to stdout.",
"By default, this will send the whole subvolume. To do an incremental",
"send, use '-p <parent>'. If you want to allow btrfs to clone from",
- "any additional local snapshots, use -c <clone-src> (multiple times",
+ "any additional local snapshots, use '-c <clone-src>' (multiple times",
"where applicable). You must not specify clone sources unless you",
"guarantee that these snapshots are exactly in the same state on both",
"sides, the sender and the receiver. It is allowed to omit the",
optind = 1;
while (1) {
- int c = getopt(argc, argv, "c:i:r");
+ int c = getopt(argc, argv, "c:i:");
if (c < 0)
break;
* - lowercase for enabling specific items in the output
*/
static const char * const cmd_subvol_list_usage[] = {
- "btrfs subvolume list [-agopurts] [-G [+|-]value] [-C [+|-]value] "
+ "btrfs subvolume list [options] [-G [+|-]value] [-C [+|-]value] "
"[--sort=gen,ogen,rootid,path] <path>",
"List subvolumes (and snapshots)",
"",
}
static const char * const cmd_snapshot_usage[] = {
- "btrfs subvolume snapshot [-r] <source> [<dest>/]<name>",
- "btrfs subvolume snapshot [-r] [-i <qgroupid>] <source> [<dest>/]<name>",
+ "btrfs subvolume snapshot [-r] <source> <dest>|[<dest>/]<name>",
+ "btrfs subvolume snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>",
"Create a snapshot of the subvolume",
"Create a writable/readonly snapshot of the subvolume <source> with",
- "the name <name> in the <dest> directory",
+ "the name <name> in the <dest> directory. If only <dest> is given,",
+ "the subvolume will be named the basename of <source>.",
"",
"-r create a readonly snapshot",
"-i <qgroupid> add the newly created snapshot to a qgroup. This",