Azure-cli: Recursivley List Files

Created on 4 Feb 2018  Â·  8Comments  Â·  Source: Azure/azure-cli

Hello,

Can you please tell me how to recursively list all files in file container using the cli? az storage file list will not list files in directories without me having to explicitly indicate which directory but sub folders that have files won't be listed. Thanks


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: c633bcb6-d7c0-8bfe-76b6-c69fed9eaf90
  • Version Independent ID: 6b2e9a7e-c75f-0b48-0794-acd0ba474eba
  • Content
  • Content Source
  • Service: storage
Storage question

Most helpful comment

Where were we on this feature? This is too wierd in first place that the fileshare has to behave differently on listing, finding.

All 8 comments

Hello TJPREScott,

Can I please get an answer to my question soon?

Thanks

@troydai @williexu

There isn't a command recursively list all the content in a file share. You need to script az storage file list multiple times to list all files in a share. The other option is to mount the file share in your OS and list files. https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows

Hello Troy,

Thanks, can you guys add that feature request to your backlog? It would be
really handy. AWS cli has that feature and it saves a lot of time.

On Fri, Feb 9, 2018 at 10:59 AM, Troy Dai notifications@github.com wrote:

There isn't a command recursively list all the content in a file share.
You need to script az storage file list multiple times to list all files
in a share. The other option is to mount the file share in your OS and list
files. https://docs.microsoft.com/en-us/azure/storage/files/
storage-how-to-use-files-windows

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-cli/issues/5474#issuecomment-364526572,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWbFjzyDVf-cTVHFju2jQAs4WxtF7H5Wks5tTJWRgaJpZM4R4t8h
.

@troydai @williexu If I called az storage blob list without --num-results on a blob container would it list all the files if I had over 100000 + blob files?

Thanks

@chanaka-jostle yes, it would.

Thanks for the reply!

Where were we on this feature? This is too wierd in first place that the fileshare has to behave differently on listing, finding.

Was this page helpful?
0 / 5 - 0 ratings