The hadoop lsr command recursively displays the directories, sub directories and files in the specified directory. The usage example is shown below:
> hadoop fs -lsr /user/hadoop/dir
Found 2 items
drwxr-xr-x - hadoop hadoop 0 2017-01-10 09:47 /user/hadoop/dir/products
-rw-r--r-- 2 hadoop hadoop 1971684 2017-01-10 09:47 /user/hadoop/dir/products/products.dat
The hadoop fs lsr command is similar to the ls -R command in unix.
> hadoop fs -lsr /user/hadoop/dir
Found 2 items
drwxr-xr-x - hadoop hadoop 0 2017-01-10 09:47 /user/hadoop/dir/products
-rw-r--r-- 2 hadoop hadoop 1971684 2017-01-10 09:47 /user/hadoop/dir/products/products.dat
The hadoop fs lsr command is similar to the ls -R command in unix.