@@ -4,9 +4,10 @@ There are many commands to help you manage your file system. This page provides
## Overview
If you run `juicefs` by itself, it will print all available subcommands. In addition, you can add `-h/--help` flag after each subcommand to get more information of that subcommand.
If you run `juicefs` by itself, it will print all available commands. In addition, you can add `-h/--help` flag after each command to get more information of it.
```
```bash
$ juicefs -h
NAME:
juicefs - A POSIX file system built on Redis and object storage.
**Note:** If `juicefs` is not placed in your `$PATH`, you should run the script with the path to the script. For example, if `juicefs` is placed in current directory, you should use `./juicefs`. It is recommended to place `juicefs` in your `$PATH` for convenience.
## Auto Completion
To enable commands completion, simply source the script provided within `hack/autocomplete`. For example:
Bash:
```bash
$ source hack/autocomplete/bash_autocomplete
```
Zsh:
```bash
$ source hack/autocomplete/zsh_autocomplete
```
Add `-h` or `--help` after all commands, getting arguments list and help information.
Please note the auto-completion is only enabled for the current session. If you want it for all new sessions, add the `source` command to `.bashrc` or `.zshrc`:
***Note:*** If `juicefs` is not placed in your `$PATH`, you should run the script with the path to the script. For example, if `juicefs` is placed in current directory, you should use `./juicefs`. It is recommended to place `juicefs` in your `$PATH` for the convenience.
**Note:** This feature is implemented base on `github.com/urfave/cli/v2`, you can find more information [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md#enabling).
The documentation below gives you detailed information about each subcommand.
## Commands
## juicefs format
### juicefs format
### Description
#### Description
Format a volume. It's the first step for initializing a new file system volume.
### Synopsis
#### Synopsis
```
juicefs format [command options] REDIS-URL NAME
```
### Options
#### Options
`--block-size value`\
size of block in KiB (default: 4096)
...
...
@@ -104,19 +138,19 @@ overwrite existing format (default: false)
`--no-update`\
don't update existing volume (default: false)
## juicefs mount
### juicefs mount
### Description
#### Description
Mount a volume. The volume shoud be formatted first.
### Synopsis
#### Synopsis
```
juicefs mount [command options] REDIS-URL MOUNTPOINT
```
### Options
#### Options
`--metrics value`\
address to export metrics (default: "127.0.0.1:9567")
...
...
@@ -181,36 +215,36 @@ min free space (ratio) (default: 0.1)
`--cache-partial-only`\
cache only random/small read (default: false)
## juicefs umount
### juicefs umount
### Description
#### Description
Unmount a volume.
### Synopsis
#### Synopsis
```
juicefs umount [command options] MOUNTPOINT
```
### Options
#### Options
`-f, --force`\
unmount a busy mount point by force (default: false)