6.5

Table Of Contents
Command Description Target Syntax
--get
-g <remote_path>
<local_path>
Downloads a le from the ESXi host to the
machine on which you run vCLI. This
operation uses HTTP GET.
Datastore
Host
get src_dstore_file_path
dst_local_file_path
get src_d store_dir_path
dst_local_file_path
--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 le in a datastore to another location
in a datastore. The <source> must be a
remote source path, the <target> a remote
target path or directory.
The --force option replaces existing
destination les.
Datastore
Temp
move src_file_path
dst_directory_path [--
force]
move src_file_path
dst_file_path [--force]
--put
-p <local_path>
<remote_path>
Uploads a le from the machine on which you
run vCLI to the ESXi host. This operation uses
HTTP PUT.
This command can replace existing host les
but cannot create new les.
Datastore
Host Temp
put src_local_file_path
dst_file_path
put src_local_file_path
dst_directory_path
--rm
-r <remote_path>
Deletes a datastore le. 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
vifs Examples
You can use vifs to interact with the remote ESXi or vCenter Server system in a variety of ways.
Specify one of the connection options listed in “Connection Options for vCLI Host Management
Commands,” on page 19 in place of <conn_options>.
N The examples illustrate use on a Linux system. You must use double quotes instead of single quotes
when on a Windows system.
Listing Remote Information
n
List all data centers on a vCenter Server system with --listdc, using --server to point to the
vCenter Server system.
vifs --server <my_vc>--username administrator --password <pswd> --listdc
n
List all datastores on a vCenter Server system with --listds.
vifs --server <my_vc> --username administrator --password <pswd> --dc kw-dev --listds
n
List all datastores on an ESXi host with --listds.
vifs --server <my_ESXi> --username root --password <pswd> --listds
The command lists the names of all datastores on the specied server.
Chapter 3 Managing Files
VMware, Inc. 37