diff --git a/cmd/size/size.go b/cmd/size/size.go index 3be067e69..be00952bb 100644 --- a/cmd/size/size.go +++ b/cmd/size/size.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "os" + "strconv" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/fs" @@ -69,7 +70,13 @@ of the size command. if jsonOutput { return json.NewEncoder(os.Stdout).Encode(results) } - fmt.Printf("Total objects: %s (%d)\n", fs.CountSuffix(results.Count), results.Count) + count := strconv.FormatInt(results.Count, 10) + countSuffix := fs.CountSuffix(results.Count).String() + if count == countSuffix { + fmt.Printf("Total objects: %s\n", count) + } else { + fmt.Printf("Total objects: %s (%s)\n", countSuffix, count) + } fmt.Printf("Total size: %s (%d Byte)\n", fs.SizeSuffix(results.Bytes).ByteUnit(), results.Bytes) if results.Sizeless > 0 { fmt.Printf("Total objects with unknown size: %s (%d)\n", fs.CountSuffix(results.Sizeless), results.Sizeless)