Share via


az storage fs file

Manage files in Azure Data Lake Storage Gen2 account.

Commands

Name Description Type Status
az storage fs file append

Append content to a file in ADLS Gen2 file system.

Core GA
az storage fs file create

Create a new file in ADLS Gen2 file system.

Core GA
az storage fs file delete

Delete a file in ADLS Gen2 file system.

Core GA
az storage fs file download

Download a file from the specified path in ADLS Gen2 file system.

Core GA
az storage fs file exists

Check for the existence of a file in ADLS Gen2 file system.

Core GA
az storage fs file list

List files and directories in ADLS Gen2 file system.

Core GA
az storage fs file metadata

Manage the metadata for file in file system.

Core GA
az storage fs file metadata show

Return all user-defined metadata for the specified file.

Core GA
az storage fs file metadata update

Sets one or more user-defined name-value pairs for the specified file system.

Core GA
az storage fs file move

Move a file in ADLS Gen2 Account.

Core GA
az storage fs file set-expiry

Sets the time a file will expire and be deleted.

Core GA
az storage fs file show

Show properties of file in ADLS Gen2 file system.

Core GA
az storage fs file upload

Upload a file to a file path in ADLS Gen2 file system.

Core GA

az storage fs file append

Experimental Preview Deprecated

Append content to a file in ADLS Gen2 file system.

az storage fs file append --content
                          --file-system
                          --path
                          [--account-key]
                          [--account-name]
                          [--auth-mode {key, login}]
                          [--blob-endpoint]
                          [--connection-string]
                          [--sas-token]
                          [--timeout]

Examples

Append content to a file in ADLS Gen2 file system.

az storage fs file append --content "test content test" -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--content
Experimental Preview Deprecated

Content to be appended to file.

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file create

Experimental Preview Deprecated

Create a new file in ADLS Gen2 file system.

az storage fs file create --file-system
                          --path
                          [--account-key]
                          [--account-name]
                          [--auth-mode {key, login}]
                          [--blob-endpoint]
                          [--connection-string]
                          [--content-cache]
                          [--content-disposition]
                          [--content-encoding]
                          [--content-language]
                          [--content-md5]
                          [--content-type]
                          [--metadata]
                          [--permissions]
                          [--sas-token]
                          [--timeout]
                          [--umask]

Examples

Create a new file in ADLS Gen2 file system.

az storage fs file create -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--content-cache --content-cache-control
Experimental Preview Deprecated

The cache control string.

--content-disposition
Experimental Preview Deprecated

Conveys additional information about how to process the response payload, and can also be used to attach additional metadata.

--content-encoding
Experimental Preview Deprecated

The content encoding type.

--content-language
Experimental Preview Deprecated

The content language.

--content-md5
Experimental Preview Deprecated

The content's MD5 hash.

--content-type
Experimental Preview Deprecated

The content MIME type.

--metadata
Experimental Preview Deprecated

Metadata in space-separated key=value pairs. This overwrites any existing metadata.

--permissions
Experimental Preview Deprecated

POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read (4), write (2), or execute (1) permission. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. The sticky bit is also supported and in symbolic notation, its represented either by the letter t or T in the final character-place depending on whether the execution bit for the others category is set or unset respectively (e.g. rwxrw-rw- with sticky bit is represented as rwxrw-rwT. A rwxrw-rwx with sticky bit is represented as rwxrw-rwt), absence of t or T indicates sticky bit not set. In 4-digit octal notation, its represented by 1st digit (e.g. 1766 represents rwxrw-rw- with sticky bit and 0766 represents rwxrw-rw- without sticky bit). For more information, please refer to https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control#levels-of-permission.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

--umask
Experimental Preview Deprecated

When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. The resulting permission is given by p & ^u, where p is the permission and u is the umask. For more information, please refer to https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control#umask.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file delete

Experimental Preview Deprecated

Delete a file in ADLS Gen2 file system.

az storage fs file delete --file-system
                          --path
                          [--account-key]
                          [--account-name]
                          [--auth-mode {key, login}]
                          [--blob-endpoint]
                          [--connection-string]
                          [--sas-token]
                          [--timeout]
                          [--yes]

Examples

Delete a file in ADLS Gen2 file system.

az storage fs file delete -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

--yes -y
Experimental Preview Deprecated

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file download

Experimental Preview Deprecated

Download a file from the specified path in ADLS Gen2 file system.

az storage fs file download --file-system
                            --path
                            [--account-key]
                            [--account-name]
                            [--auth-mode {key, login}]
                            [--blob-endpoint]
                            [--connection-string]
                            [--destination]
                            [--overwrite {false, true}]
                            [--sas-token]
                            [--timeout]

Examples

Download a file in ADLS Gen2 file system to current path.

az storage fs file download -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Download a file in ADLS Gen2 file system to a specified directory.

az storage fs file download -p dir/a.txt -d test/ -f fsname --account-name myadlsaccount --account-key 0000-0000

Download a file in ADLS Gen2 file system to a specified file path.

az storage fs file download -p dir/a.txt -d test/b.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--destination -d
Experimental Preview Deprecated

The local file where the file or folder will be downloaded to. The source filename will be used if not specified.

--overwrite
Experimental Preview Deprecated

Overwrite an existing file when specified. Default value is false.

Accepted values: false, true
Default value: True
--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file exists

Experimental Preview Deprecated

Check for the existence of a file in ADLS Gen2 file system.

az storage fs file exists --file-system
                          --path
                          [--account-key]
                          [--account-name]
                          [--auth-mode {key, login}]
                          [--blob-endpoint]
                          [--connection-string]
                          [--sas-token]
                          [--timeout]

Examples

Check for the existence of a file in ADLS Gen2 file system.

az storage fs file exists -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file list

Experimental Preview Deprecated

List files and directories in ADLS Gen2 file system.

az storage fs file list --file-system
                        [--account-key]
                        [--account-name]
                        [--auth-mode {key, login}]
                        [--blob-endpoint]
                        [--connection-string]
                        [--exclude-dir]
                        [--marker]
                        [--num-results]
                        [--path]
                        [--recursive {false, true}]
                        [--sas-token]
                        [--show-next-marker]
                        [--timeout]

Examples

List files and directories in ADLS Gen2 file system.

az storage fs file list -f fsname --account-name myadlsaccount --account-key 0000-0000

List files in ADLS Gen2 file system.

az storage fs file list --exclude-dir -f fsname --account-name myadlsaccount --account-key 0000-0000

List files and directories in a specified path.

az storage fs file list --path dir -f fsname --account-name myadlsaccount --account-key 0000-0000

List files and directories from a specific marker.

az storage fs file list --marker "VBaS6LvPufaqrTANTQvbmV3dHJ5FgAAAA==" -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--exclude-dir
Experimental Preview Deprecated

List only files in the given file system.

--marker
Experimental Preview Deprecated

An opaque continuation token. This value can be retrieved from the next_marker field of a previous generator object. If specified, this generator will begin returning results from this point.

--num-results
Experimental Preview Deprecated

Specify the maximum number of results to return. If the request does not specify num_results or specifies a value greater than 5,000, the server will return up to 5,000 items.

Default value: 5000
--path
Experimental Preview Deprecated

Filter the results to return only paths under the specified path.

--recursive
Experimental Preview Deprecated

Look into sub-directories recursively when set to true.

Accepted values: false, true
Default value: True
--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--show-next-marker
Experimental Preview Deprecated

Show nextMarker in result when specified.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file move

Experimental Preview Deprecated

Move a file in ADLS Gen2 Account.

az storage fs file move --file-system
                        --new-path
                        --path
                        [--account-key]
                        [--account-name]
                        [--auth-mode {key, login}]
                        [--blob-endpoint]
                        [--connection-string]
                        [--content-cache]
                        [--content-disposition]
                        [--content-encoding]
                        [--content-language]
                        [--content-md5]
                        [--content-type]
                        [--sas-token]

Examples

Move a file in ADLS Gen2 Account.

az storage fs file move --new-path new-fs/new-dir/b.txt -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--new-path
Experimental Preview Deprecated

The new path the users want to move to. The value must have the following format: "{filesystem}/{directory}/{subdirectory}/{file}".

--path -p
Experimental Preview Deprecated

The original file path users want to move in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--content-cache --content-cache-control
Experimental Preview Deprecated

The cache control string.

--content-disposition
Experimental Preview Deprecated

Conveys additional information about how to process the response payload, and can also be used to attach additional metadata.

--content-encoding
Experimental Preview Deprecated

The content encoding type.

--content-language
Experimental Preview Deprecated

The content language.

--content-md5
Experimental Preview Deprecated

The content's MD5 hash.

--content-type
Experimental Preview Deprecated

The content MIME type.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file set-expiry

Experimental Preview Deprecated

Sets the time a file will expire and be deleted.

az storage fs file set-expiry --expiry-options {Absolute, NeverExpire, RelativeToCreation, RelativeToNow}
                              --file-system
                              --path
                              [--account-key]
                              [--account-name]
                              [--auth-mode {key, login}]
                              [--blob-endpoint]
                              [--connection-string]
                              [--expires-on]
                              [--sas-token]
                              [--timeout]

Examples

Required Parameters

--expiry-options
Experimental Preview Deprecated

Required. Indicates mode of the expiry time. Possible values include: 'NeverExpire', 'RelativeToCreation', 'RelativeToNow', 'Absolute'.

Accepted values: Absolute, NeverExpire, RelativeToCreation, RelativeToNow
--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--expires-on
Experimental Preview Deprecated

The time to set the file to expiry. When expiry_options is RelativeTo*, expires_on should be an int in milliseconds. If the type of expires_on is datetime, it should be in UTC time.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file show

Experimental Preview Deprecated

Show properties of file in ADLS Gen2 file system.

az storage fs file show --file-system
                        --path
                        [--account-key]
                        [--account-name]
                        [--auth-mode {key, login}]
                        [--blob-endpoint]
                        [--connection-string]
                        [--sas-token]
                        [--timeout]

Examples

Show properties of file in ADLS Gen2 file system.

az storage fs file show -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Show properties of file in ADLS Gen2 file system. (autogenerated)

az storage fs file show --account-name myadlsaccount --auth-mode login --file-system fsname --path dir/a.txt

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az storage fs file upload

Experimental Preview Deprecated

Upload a file to a file path in ADLS Gen2 file system.

az storage fs file upload --file-system
                          --path
                          --source
                          [--account-key]
                          [--account-name]
                          [--auth-mode {key, login}]
                          [--blob-endpoint]
                          [--connection-string]
                          [--content-cache]
                          [--content-disposition]
                          [--content-encoding]
                          [--content-language]
                          [--content-md5]
                          [--content-type]
                          [--if-match]
                          [--if-modified-since]
                          [--if-none-match]
                          [--if-unmodified-since]
                          [--metadata]
                          [--overwrite {false, true}]
                          [--permissions]
                          [--sas-token]
                          [--timeout]
                          [--umask]

Examples

Upload a file from local path to a file path in ADLS Gen2 file system.

az storage fs file upload --source a.txt -p dir/a.txt -f fsname --account-name myadlsaccount --account-key 0000-0000

Required Parameters

--file-system -f
Experimental Preview Deprecated

File system name (i.e. container name).

--path -p
Experimental Preview Deprecated

The file path in a file system.

--source -s
Experimental Preview Deprecated

Path of the local file to upload as the file content.

Optional Parameters

--account-key
Experimental Preview Deprecated

Storage account key. Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_KEY.

--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--auth-mode
Experimental Preview Deprecated

The mode in which to run the command. "login" mode will directly use your login credentials for the authentication. The legacy "key" mode will attempt to query for an account key if no authentication parameters for the account are provided. Environment variable: AZURE_STORAGE_AUTH_MODE.

Accepted values: key, login
--blob-endpoint
Experimental Preview Deprecated

Storage data service endpoint. Must be used in conjunction with either storage account key or a SAS token. You can find each service primary endpoint with az storage account show. Environment variable: AZURE_STORAGE_SERVICE_ENDPOINT.

--connection-string
Experimental Preview Deprecated

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--content-cache --content-cache-control
Experimental Preview Deprecated

The cache control string.

--content-disposition
Experimental Preview Deprecated

Conveys additional information about how to process the response payload, and can also be used to attach additional metadata.

--content-encoding
Experimental Preview Deprecated

The content encoding type.

--content-language
Experimental Preview Deprecated

The content language.

--content-md5
Experimental Preview Deprecated

The content's MD5 hash.

--content-type
Experimental Preview Deprecated

The content MIME type.

--if-match
Experimental Preview Deprecated

An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified.

--if-modified-since
Experimental Preview Deprecated

A Commence only if modified since supplied UTC datetime (Y-m-d'T'H:M'Z').

--if-none-match
Experimental Preview Deprecated

An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag does not match the value specified.

--if-unmodified-since
Experimental Preview Deprecated

A Commence only if unmodified since supplied UTC datetime (Y-m-d'T'H:M'Z').

--metadata
Experimental Preview Deprecated

Metadata in space-separated key=value pairs. This overwrites any existing metadata.

--overwrite
Experimental Preview Deprecated

Overwrite an existing file when specified.

Accepted values: false, true
--permissions
Experimental Preview Deprecated

POSIX access permissions for the file owner, the file owning group, and others. Each class may be granted read (4), write (2), or execute (1) permission. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. The sticky bit is also supported and in symbolic notation, its represented either by the letter t or T in the final character-place depending on whether the execution bit for the others category is set or unset respectively (e.g. rwxrw-rw- with sticky bit is represented as rwxrw-rwT. A rwxrw-rwx with sticky bit is represented as rwxrw-rwt), absence of t or T indicates sticky bit not set. In 4-digit octal notation, its represented by 1st digit (e.g. 1766 represents rwxrw-rw- with sticky bit and 0766 represents rwxrw-rw- without sticky bit). For more information, please refer to https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control#levels-of-permission.

--sas-token
Experimental Preview Deprecated

A Shared Access Signature (SAS). Must be used in conjunction with storage account name or service endpoint. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout
Experimental Preview Deprecated

Request timeout in seconds. Applies to each call to the service.

--umask
Experimental Preview Deprecated

When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. The resulting permission is given by p & ^u, where p is the permission and u is the umask. For more information, please refer to https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control#umask.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.