Hadoop get filesize and directory from ls command

hadoop fs -ls /my/folder  | awk '{print $8}' > only_directory.txt

You can just change the numbers above for getting different information

Example

hadoop fs -ls /my/folder  | awk '{print $6, $8}' > only_date_directory.txt

No comments:

Post a Comment

Please share your views and comments below.

Thank You.