Add -h (human-readable format sizes) option for "du" command

Description

du command shows the size of a file or dir in bytes.
when the number is large, it is hard to read.

This JIRA aims to add an -h option similar to what "bin/alluxio fs ls" provides to show size in a more readable way. So that "bin/alluxio fs du -h <path>" will give the output based on how much the output value is. e.g., a file of 1024Byte will show as 1KB. Please check how LsCommand implements this in method formatLsString.

Environment

None
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

y

Reporter

Bin Fan

Labels