Hadoop Commands
Hadoop Commands
Certainly! Here's the list of commands with `/user/cloudera/` as the HDFS path and `/home/cloudera/` as the local
file system path:
# Copy files from local file system (/home/cloudera/) to HDFS under /user/cloudera/
hadoop fs -copyFromLocal /home/cloudera/local_file.txt /user/cloudera/
# Copy files from HDFS under /user/cloudera/ to local file system (/home/cloudera/)
hadoop fs -copyToLocal /user/cloudera/hdfs_file.txt /home/cloudera/
# Count the number of directories, files, and bytes under the given path /user/cloudera/
hadoop fs -count /user/cloudera/
# Display the Access Control Lists (ACLs) for files and directories under /user/cloudera/
hadoop fs -getfacl /user/cloudera/
Make sure to replace `/user/cloudera/` and `/home/cloudera/` with the appropriate paths on HDFS and your local
file system respectively.
Here's the list of commands with `/user/cloudera/` as the HDFS path and `/home/cloudera/` as the local file system
path, formatted with `hdfs dfs` commands instead of `hadoop fs`: