‘-R’ option is used to print the contents of a directory recursively.
Example
hadoop fs -ls -R -h /user/cloudera
$hadoop fs -ls -R -h /user/cloudera
drwxr-xr-x - cloudera cloudera 0 2022-03-22 23:58 /user/cloudera/demo1
-rw-r--r-- 1 cloudera cloudera 2 2022-03-22 23:58 /user/cloudera/demo1/a.txt
-rw-r--r-- 1 cloudera cloudera 4.5 M 2022-03-22 23:57 /user/cloudera/demo1/apacheNifi.docx
-rw-r--r-- 1 cloudera cloudera 5.9 M 2022-03-22 23:57 /user/cloudera/demo1/atlas.docx
-rw-r--r-- 1 cloudera cloudera 8.7 M 2022-03-22 23:57 /user/cloudera/demo1/atlasClient.docx
-rw-r--r-- 1 cloudera cloudera 6.7 M 2022-03-22 23:58 /user/cloudera/demo1/gradle.docx
-rw-r--r-- 1 cloudera cloudera 8.6 M 2022-03-22 23:58 /user/cloudera/demo1/maven.docx
drwxr-xr-x - cloudera cloudera 0 2022-03-22 23:48 /user/cloudera/demo2
No comments:
Post a Comment