SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Adjust dir parameter default value.
chrislusf7272af8ec454
diff --git a/go/weed/compact.go b/go/weed/compact.goindex f6e004b7ac..a599f5d640 100644--- a/go/weed/compact.go+++ b/go/weed/compact.go@@ -21,7 +21,7 @@ var cmdCompact = &Command{}var (- compactVolumePath = cmdCompact.Flag.String("dir", "/tmp", "data directory to store files")+ compactVolumePath = cmdCompact.Flag.String("dir", ".", "data directory to store files")compactVolumeCollection = cmdCompact.Flag.String("collection", "", "volume collection name")compactVolumeId = cmdCompact.Flag.Int("volumeId", -1, "a volume id. The volume should already exist in the dir."))diff --git a/go/weed/export.go b/go/weed/export.goindex 8dd298578c..7b2fdb8173 100644--- a/go/weed/export.go+++ b/go/weed/export.go@@ -21,11 +21,11 @@ func init() {const (defaultFnFormat = `{{.Mime}}/{{.Id}}:{{.Name}}`- timeFormat = "2006-01-02T15:04:05"+ timeFormat = "2006-01-02T15:04:05")var cmdExport = &Command{- UsageLine: "export -dir=/tmp -volumeId=234 -o=/dir/name.tar -fileNameFormat={{.Name}} -newer='"+timeFormat+"'",+ UsageLine: "export -dir=/tmp -volumeId=234 -o=/dir/name.tar -fileNameFormat={{.Name}} -newer='" + timeFormat + "'",Short: "list or export files from one volume data file",Long: `List all files in a volume, or Export all files in a volume to a tar file if the output is specified.@@ -35,7 +35,7 @@ var cmdExport = &Command{}var (- exportVolumePath = cmdExport.Flag.String("dir", "/tmp", "input data directory to store volume data files")+ exportVolumePath = cmdExport.Flag.String("dir", ".", "input data directory to store volume data files")exportCollection = cmdExport.Flag.String("collection", "", "the volume collection name")exportVolumeId = cmdExport.Flag.Int("volumeId", -1, "a volume id. The volume .dat and .idx files should already exist in the dir.")dest = cmdExport.Flag.String("o", "", "output tar file name, must ends with .tar, or just a \"-\" for stdout")@@ -47,7 +47,7 @@ var (fnTmplBuf = bytes.NewBuffer(nil)newerThan time.TimenewerThanUnix int64 = -1- localLocation, _ = time.LoadLocation("Local")+ localLocation, _ = time.LoadLocation("Local"))func runExport(cmd *Command, args []string) bool {@@ -173,7 +173,7 @@ func walker(vid storage.VolumeId, n *storage.Needle, version storage.Version) (eif n.HasLastModifiedDate() {tarHeader.ModTime = time.Unix(int64(n.LastModified), 0)} else {- tarHeader.ModTime = time.Unix(0,0)+ tarHeader.ModTime = time.Unix(0, 0)}tarHeader.ChangeTime = tarHeader.ModTimeif err = tarFh.WriteHeader(&tarHeader); err != nil {diff --git a/go/weed/fix.go b/go/weed/fix.goindex f0fdbe7aaf..3abcbc31ca 100644--- a/go/weed/fix.go+++ b/go/weed/fix.go@@ -22,7 +22,7 @@ var cmdFix = &Command{}var (- fixVolumePath = cmdFix.Flag.String("dir", "/tmp", "data directory to store files")+ fixVolumePath = cmdFix.Flag.String("dir", ".", "data directory to store files")fixVolumeCollection = cmdFix.Flag.String("collection", "", "the volume collection name")fixVolumeId = cmdFix.Flag.Int("volumeId", -1, "a volume id. The volume should already exist in the dir. The volume index file should not exist."))diff --git a/go/weed/mount.go b/go/weed/mount.goindex de7a3b8c3b..e6f46c392f 100644--- a/go/weed/mount.go+++ b/go/weed/mount.go@@ -13,7 +13,7 @@ func init() {cmdMount.Run = runMount // break init cyclecmdMount.IsDebug = cmdMount.Flag.Bool("debug", false, "verbose debug information")mountOptions.filer = cmdMount.Flag.String("filer", "localhost:8888", "weed filer location")- mountOptions.dir = cmdMount.Flag.String("dir", "", "mount weed filer to this directory")+ mountOptions.dir = cmdMount.Flag.String("dir", ".", "mount weed filer to this directory")}var cmdMount = &Command{