# load Hadoop module
--------------------
module load Hadoop/2.6.0-cdh5.8.0-native
# create a new directory called "input" on HDFS
hdfs dfs -mkdir input
# copy local file wiki_sample to input on HDFS
hdfs dfs -put wiki_1k_lines input/
# list contents of directory ("-h" = human)
hdfs dfs -ls -h input
# disk usage
hdfs dfs -du -h input
# get help on "du" command
hdfs dfs -help du
# remove directory
hdfs dfs -rm -r input
# usage
hdfs dfs -usage
# get help on the HDFS "tail" command
hdfs dfs -help tail
# show the size of wiki_1k_lines on the regular filesystem
ls -lh wiki_1k_lines
# show the size of wiki_1k_lines on HDFS
hdfs dfs -put wiki_1k_lines
hdfs dfs -ls -h wiki_1k_lines
# disk usage of wiki_1k_lines on the regular filesystem
du -h wiki_1k_lines
# disk usage of wiki_1k_lines on HDFS
hdfs dfs -du -h wiki_1k_lines
# check blocksize and replication
hdfs dfs -stat 'Block size: %o No. of blocks: %b Replication:%r'
input/wiki_1k_lines