updated hdfs_file_size.sh

pull/2/head
Hari Sekhon 5 years ago
parent 661bedd685
commit 954a943cb0

@ -42,6 +42,8 @@ for arg; do
esac
done
# if using -h there will be more columns so remove cols 3 + 4 which are replica sizes eg.
# 21.7 M 65.0 M hdfs://nameservice1/user/hive/warehouse/...
hdfs dfs -du "$@" |
awk '{ if($2 ~ /[A-Za-z]/){ $3=""; $4=""} else { $2="" }; print }'
awk '{ if($2 ~ /[A-Za-z]/){ $3=""; $4=""} else { $2="" }; print }' |
column -t

Loading…
Cancel
Save