How to find the size of a HDFS file? What command should be used to find the size of any file in HDFS.
You can use hadoop fs -ls command to list files in the current directory as well as their details. The 5th column in the command output contains file size in bytes.
For e.g. command hadoop fs -ls input gives following output:
Found 1 items
-rw-r--r-- 1 hduser supergroup 45956 2012-07-19 20:57 /user/hduser/input/sou
The size of file sou is 45956 bytes.