1. cut 多个空格视为一个
hdfs dfs -ls -h /rawlog/xx/country=ID/dt=2019-06-26/hour=15/ |tr -s ' ' |cut -d ' ' -f5
其中tr -s ' '用于压缩空格
2. 文件每行一个数字,计算所有数据和
du -l /data*/kafka-logs/ |grep bi_tracking |awk '{print $1}' |sort -n |head -n -6 |jq -s add
1. cut 多个空格视为一个
hdfs dfs -ls -h /rawlog/xx/country=ID/dt=2019-06-26/hour=15/ |tr -s ' ' |cut -d ' ' -f5
其中tr -s ' '用于压缩空格
2. 文件每行一个数字,计算所有数据和