---
title: file
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical-com-2934.demos.haus/maas/docs/file?format=md
---

*Submit*

# file

Enter keyword arguments in the form `key=value`.

## [Delete a file](https://canonical-com-2934.demos.haus/maas/docs/file?format=md#p-23240-delete-a-file)

```
maas $PROFILE file delete [--help] [-d] [-k] filename [data ...]
```

#### Positional arguments

* filename

Delete a file with the given file name.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Read a stored file](https://canonical-com-2934.demos.haus/maas/docs/file?format=md#p-23240-read-a-stored-file)

```
maas $PROFILE file read [--help] [-d] [-k] filename [data ...]
```

#### Positional arguments

* filename

Reads a stored file with the given file name. The content of the file is base64-encoded.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Delete a file](https://canonical-com-2934.demos.haus/maas/docs/file?format=md#p-23240-delete-a-file)

```
maas $PROFILE file delete [--help] [-d] [-k] filename [data ...]
```

#### Positional arguments

* filename

Delete a file with the given file name.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Get a named file](https://canonical-com-2934.demos.haus/maas/docs/file?format=md#p-23240-get-a-named-file)

```
maas $PROFILE files get [--help] [-d] [-k] [data ...]
```

Get a named file from the file storage.

#### Keyword “filename”

Required String. The name of the file.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Get a file by key](https://canonical-com-2934.demos.haus/maas/docs/file?format=md#p-23240-get-a-file-by-key)

```
maas $PROFILE files get-by-key [--help] [-d] [-k] [data ...]
```

Get a file from the file storage with the given key.

#### Keyword “key”

Required String. The file’s key.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [List files](https://canonical-com-2934.demos.haus/maas/docs/file?format=md#p-23240-list-files)

```
maas $PROFILE files read [--help] [-d] [-k] [data ...]
```

List the files from the file storage. The returned files are ordered by file name and the content is excluded.

#### Keyword “prefix”

Optional String. Prefix used to filter returned files.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

---

[Previous

fabric](https://canonical-com-2934.demos.haus/maas/docs/fabric)
[Next

init](https://canonical-com-2934.demos.haus/maas/docs/init)

Last updated 1 year, 6 months ago. [Help improve this document in the forum](https://discourse.maas.io/t/file/11360).
