I know du -sh
in common Linux filesystems. But how to do that with HDFS?
相关问题
- How to access the camera from my Windows Phone 8 a
- Spark on Yarn Container Failure
- softlinks atime and mtime modification
- Get unexpanded argument from bash command line
- Include and Execute EXE in C# Command Line App
相关文章
- Java写文件至HDFS失败
- mapreduce count example
- Compile and build with single command line Java (L
- How to update command line output?
- How to execute another python script from your scr
- Directory.CreateDirectory Latency Issue?
- Could you give me any clue Why 'Cannot call me
- How can i list only the folders in zip archive in
hadoop version 2.3.33:
To get the size of the directory hdfs dfs -du -s -h /$yourDirectoryName can be used. hdfs dfsadmin -report can be used to see a quick cluster level storage report.
Command Should be
hadoop fs -du -s -h \dirPath
-du [-s] [-h] ... : Show the amount of space, in bytes, used by the files that match the specified file pattern.
-s : Rather than showing the size of each individual file that matches the
pattern, shows the total (summary) size.
-h : Formats the sizes of files in a human-readable fashion rather than a number of bytes. (Ex MB/GB/TB etc)
Note that, even without the -s option, this only shows size summaries one level deep into a directory.
The output is in the form size name(full path)