HDFS查看文件的行数-前几行-后几行
查看文本行数hadoop fs -cat hdfs://172.168.0.11:8020/test/says_dict/sysdict_type.data |wc -l查看文件大小(单位byte)hadoop fs -du hdfs://172.168.0.11:8020/test/says_dict/*hadoop fs -count hdfs://172.168.0.11:8020/test
·
查看文本行数
hadoop fs -cat hdfs://172.168.0.11:8020/test/says_dict/sysdict_type.data |wc -l
查看文件大小(单位byte)
hadoop fs -du hdfs://172.168.0.11:8020/test/says_dict/*
hadoop fs -count hdfs://172.168.0.11:8020/test/says_dict/*
随机返回指定行数的样本数据
hadoop fs -cat /test/gonganbu/scence_suggestions/* | shuf -n 5
返回前几行的样本数据
hadoop fs -cat /test/gonganbu/scence_suggestions/* | head -100
返回最后几行的样本数据
hadoop fs -cat /test/gonganbu/scence_suggestions/* | tail -5
更多推荐
已为社区贡献4条内容
所有评论(0)