Chris Murphy posted on Thu, 28 Jan 2016 12:39:20 -0700 as excerpted: > I've gotten tripped by this more than once myself, and have to keep > coming back to the man page; is it max:2 or 2:max or? Actually the > easier thing to do is skip important info and you get a mini cheat sheet > instead of the full man page, so you can do > > [chris@f23m ~]$ btrfs fi resize btrfs filesystem resize: too few > arguments usage: btrfs filesystem resize > [devid:][+/-]<newsize>[kKmMgGtTpPeE]|[devid:]max <path> > > While you don't get the devid 1 is default clue with this, you get the > syntax formatting. When I first started with btrfs, I setup a helper script, that checks for command and subcommand and a reasonable number of parameters. If it gets them, it passes everything on as-is. If it doesn't, or if they don't look like commands/subcommands that btrfs will understand, it gives you the list of commands/subcommands for that level, or prints the --help output and asks for additional parameters. Then it prints the assembled command for you and asks for a final OK before running it. Later, I modified it to handle mkfs.btrfs as well, taking info from my fstab, etc, so I can recreate the backup filesystems and it'll set label, raid1, devices, btrfs feature options, etc, then again print the assembled btrfs.mkfs and ask for final OK before running it. That way I don't have to keep track of all the parameter details for the various commands and subcommands. If I happen to remember them I can add them to the initial commandline. If not, I get prompted for them as appropriate. =:^) That, or creating a bunch of separate scriptlet stubs or aliases that take care of most of the details (the solution I used for emerge, the default gentoo package manager), are the two ways I've found to deal with these all-in-one commands, which otherwise tend to be way too complex for me to work with, without constantly referencing the manpage as I try to enter the command. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
