6.5

Table Of Contents
n
Forcibly remove a le on the remote server with --rm <remote_path> --force.
vifs --server <my_ESXi> --username root --password <pswd> --rm '[Storage1] test2/testfile2'
--force
n
Move a le from one location on the remote server to another location with --move
<remote_source_path> <remote_target_path>. If you specify a le name, the le is moved and renamed
at the same time.
vifs --server <my_ESXi> --username root --password <pswd> --move '[Storage1] test/tfile'
'[Storage1] newfile'
If the target le already exists on the remote server, the command fails unless you use --force.
vifs --server <my_ESXi> --username root --password <pswd> --move '[Storage1] test/tfile2'
'[Storage1] test2/tfile' --force
n
Create a copy of a le on the remote server at a dierent location on the remote server.
vifs --server <my_ESXi> --username root --password <pswd> --copy '[Storage1] test/tfile'
'[Storage1] test/tfile2'
If the target le already exists on the remote server, the command fails unless you use --force.
vifs --server <my_ESXi> --username root --password <pswd> --copy '[Storage1] test/tfile'
'[Storage1] test/tfile2' --force
Manage Files and Directories on the Remote ESXi System
The following example scenario illustrates other uses of vifs.
1 Create a directory in the datastore.
vifs <conn_options> --mkdir '[osdc-cx700-03] vcli_test'
N You must specify the precise path. There is no concept of a relative path.
2 Place a le that is on the system from which you are running the commands into the newly created
directory.
vifs <conn_options> --put /tmp/test_doc '[osdc-cx700-03] vcli_test/test_doc'
3 Move a le into a virtual machine directory.
vifs <conn_options> - -move '[osdc-cx700-03] vcli_test/test_doc'
'[osdc-cx700-03] winxpPro-sp2/test_doc
A message indicates success or failure.
4 Retrieve one of the les from the remote ESXi system.
vifs <conn_options> --get '[osdc-cx700-03] winxpPro-sp2/vmware.log' ~user1/vmware.log
Retrieves a log le for analysis.
5 Clean up by removing the le and directory you created earlier.
vifs <conn_options> --rm '[osdc-cx700-03] vcli_test/test_doc'
vifs <conn_options> --rmdir '[osdc-cx700-03] vcli_test'
Chapter 3 Managing Files
VMware, Inc. 39