mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-24 02:03:17 +08:00
weed -h subcommand list is not sorted, makes discovery difficult
fix https://github.com/chrislusf/seaweedfs/issues/2214
This commit is contained in:
parent
10fc478557
commit
4cc2165061
@ -8,15 +8,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var Commands = []*Command{
|
var Commands = []*Command{
|
||||||
cmdBenchmark,
|
|
||||||
cmdBackup,
|
cmdBackup,
|
||||||
|
cmdBenchmark,
|
||||||
cmdCompact,
|
cmdCompact,
|
||||||
cmdCopy,
|
|
||||||
cmdDownload,
|
cmdDownload,
|
||||||
cmdExport,
|
cmdExport,
|
||||||
cmdFiler,
|
cmdFiler,
|
||||||
cmdFilerBackup,
|
cmdFilerBackup,
|
||||||
cmdFilerCat,
|
cmdFilerCat,
|
||||||
|
cmdFilerCopy,
|
||||||
cmdFilerMetaBackup,
|
cmdFilerMetaBackup,
|
||||||
cmdFilerMetaTail,
|
cmdFilerMetaTail,
|
||||||
cmdFilerReplicate,
|
cmdFilerReplicate,
|
||||||
|
@ -52,21 +52,21 @@ type CopyOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
cmdCopy.Run = runCopy // break init cycle
|
cmdFilerCopy.Run = runCopy // break init cycle
|
||||||
cmdCopy.IsDebug = cmdCopy.Flag.Bool("debug", false, "verbose debug information")
|
cmdFilerCopy.IsDebug = cmdFilerCopy.Flag.Bool("debug", false, "verbose debug information")
|
||||||
copy.include = cmdCopy.Flag.String("include", "", "pattens of files to copy, e.g., *.pdf, *.html, ab?d.txt, works together with -dir")
|
copy.include = cmdFilerCopy.Flag.String("include", "", "pattens of files to copy, e.g., *.pdf, *.html, ab?d.txt, works together with -dir")
|
||||||
copy.replication = cmdCopy.Flag.String("replication", "", "replication type")
|
copy.replication = cmdFilerCopy.Flag.String("replication", "", "replication type")
|
||||||
copy.collection = cmdCopy.Flag.String("collection", "", "optional collection name")
|
copy.collection = cmdFilerCopy.Flag.String("collection", "", "optional collection name")
|
||||||
copy.ttl = cmdCopy.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y")
|
copy.ttl = cmdFilerCopy.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y")
|
||||||
copy.diskType = cmdCopy.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag")
|
copy.diskType = cmdFilerCopy.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag")
|
||||||
copy.maxMB = cmdCopy.Flag.Int("maxMB", 4, "split files larger than the limit")
|
copy.maxMB = cmdFilerCopy.Flag.Int("maxMB", 4, "split files larger than the limit")
|
||||||
copy.concurrenctFiles = cmdCopy.Flag.Int("c", 8, "concurrent file copy goroutines")
|
copy.concurrenctFiles = cmdFilerCopy.Flag.Int("c", 8, "concurrent file copy goroutines")
|
||||||
copy.concurrenctChunks = cmdCopy.Flag.Int("concurrentChunks", 8, "concurrent chunk copy goroutines for each file")
|
copy.concurrenctChunks = cmdFilerCopy.Flag.Int("concurrentChunks", 8, "concurrent chunk copy goroutines for each file")
|
||||||
copy.checkSize = cmdCopy.Flag.Bool("check.size", false, "copy when the target file size is different from the source file")
|
copy.checkSize = cmdFilerCopy.Flag.Bool("check.size", false, "copy when the target file size is different from the source file")
|
||||||
copy.verbose = cmdCopy.Flag.Bool("verbose", false, "print out details during copying")
|
copy.verbose = cmdFilerCopy.Flag.Bool("verbose", false, "print out details during copying")
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmdCopy = &Command{
|
var cmdFilerCopy = &Command{
|
||||||
UsageLine: "filer.copy file_or_dir1 [file_or_dir2 file_or_dir3] http://localhost:8888/path/to/a/folder/",
|
UsageLine: "filer.copy file_or_dir1 [file_or_dir2 file_or_dir3] http://localhost:8888/path/to/a/folder/",
|
||||||
Short: "copy one or a list of files to a filer folder",
|
Short: "copy one or a list of files to a filer folder",
|
||||||
Long: `copy one or a list of files, or batch copy one whole folder recursively, to a filer folder
|
Long: `copy one or a list of files, or batch copy one whole folder recursively, to a filer folder
|
||||||
@ -154,7 +154,7 @@ func runCopy(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
copy.ttlSec = int32(ttl.Minutes()) * 60
|
copy.ttlSec = int32(ttl.Minutes()) * 60
|
||||||
|
|
||||||
if *cmdCopy.IsDebug {
|
if *cmdFilerCopy.IsDebug {
|
||||||
grace.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
|
grace.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user