I am trying to connect to hdfs location from databricks notebook to get the file details.
below are the code which I tried to obtain the same
%fs ls dbfs:/mnt/<mount>/dev/data/audit/
And i obtained result with size as 0. And only the details of folder audit, not any of its subfolders.

audit folder is having 5 more subfolders with files inside that. I want to get number of files in each subfolders and total size of those 5 subfolders.
I tried below dbutils in scala, but it doesnt have any function to get number of files or size of a file.
- Is there any way to get the size of folders and sub folders in hdfs from databricks notebook?
- Is there any way to get number of files in folders and sub folders in hdfs from databricks notebook?
