vifs command-specific options allow you to retrieve and upload files from the remote host and perform a number of other operations.
All vifs options work on datastore files or directories. Some options also work on host files and files in the temp directory. You must also specify connection options.
Command | Description | Target | Syntax |
---|---|---|---|
--copy -c <source> <target> |
Copies a file in a datastore to another location in a datastore. The The |
Datastore Temp |
|
--dir -D <remote_dir> |
Lists the contents of a datastore directory. | Datastore Temp |
|
--force -F |
Overwrites the destination file. Used with --move and --copy . |
Datastore Temp | copy src_file_path dst_file_path [--force] |
--get -g <remote_path> <local_path> |
Downloads a file from the ESXi host to the machine on which you run vCLI. This operation uses HTTP GET . |
Datastore Host |
|
--listdc -C |
Lists the data center paths available on an ESXi system. | Datastore Host | |
--listds -S |
Lists the datastore names on the ESXi system. When multiple data centers are available, use the --dc (-Z ) argument to specify the name of the data center from which you want to list the datastore. |
Datastore Host | vifs --listds |
--mkdir -M <remote_dir> |
Creates a directory in a datastore. This operation fails if the parent directory of dst_datastore_file_path does not exist. | Datastore Temp | mkdir dst_directory_path |
--move -m <source> <target> |
Moves a file in a datastore to another location in a datastore. The The |
Datastore Temp |
|
--put -p <local_path> <remote_path> |
Uploads a file from the machine on which you run vCLI to the ESXi host. This operation uses This command can replace existing host files but cannot create new files. |
Datastore Host Temp |
|
--rm -r <remote_path> |
Deletes a datastore file. | Datastore Temp | rm dst_file_path |
--rmdir -R <remote_dir> |
Deletes a datastore directory. This operation fails if the directory is not empty. | Datastore Temp | rmdir dst_directory_path |