databricks-cli icon indicating copy to clipboard operation
databricks-cli copied to clipboard

Add `-R` recursive option to `fs ls` command

Open justinTM opened this issue 3 years ago • 1 comments

currently i'm just looping results of fs ls and appending results of command to the end of the root path before running the command again until i reach the file I'm looking for across all subdirectories.

what would be nice is a -R option to recursively list subdirectories of a DBFS path.

$ databricks fs ls -R --absolute "dbfs:/job-logs"
dbfs:/job-logs/0708-112403-f1tsd6as8/executor/app-20220708042345808-0000/0/stderr
dbfs:/job-logs/0708-112403-f1tsd6as8/executor/app-20220708042345808-0000/0/stdout
dbfs:/job-logs/0708-112403-f1tsd6as8/executor/app-20220708042345808-0000/1/stdout
dbfs:/job-logs/0708-112403-f1tsd6as8/executor/app-20220708042345808-0000/1/stderr

justinTM avatar Jul 08 '22 20:07 justinTM

https://github.com/databricks/databricks-cli/pull/513

justinTM avatar Jul 08 '22 20:07 justinTM