which hadoop
or
echo $HADOOP_HOME
will get you the path of installed hadoop (if you have followed all the installation steps)
you should be typing following command from directory at which your file to transferred is located. or you can define the entire path…
hadoop fs -copyFromLocal /local/path/file.txt /hdfs/path/file.txt
hadoop fs -put localfile1 localfile2 /user/hadoop/hadoopdir
more examples available @ [Hadoop Shell Commands]:https://hadoop.apache.org/docs/r0.18.3/hdfs_shell.html#put