This topic describes how to use Jindo CLI and related commands.
Usage summary
You can run the jindo fs
command to view supported commands and information about how to use the commands.
jindo fs commands
Command | Description | Example | Scenario |
archive | Sets the storage class of Object Storage Service (OSS) objects to Infrequent Access (IA), Archive, or Cold Archive. Optional parameters:
|
| OSS |
cat | Displays text content. |
| OSS and OSS-Hadoop Distributed File System (HDFS) |
count | Displays the file size and the number of files. Optional parameter: -h: displays the unit of the file size. |
| OSS and OSS-HDFS |
cp | Copies files. Optional parameter: -f: specifies whether to perform forceful overwrite. |
| OSS and OSS-HDFS |
checksum | Calculates the CRC32 checksum of files. |
| OSS-HDFS |
chgrp | Changes the group to which a file belongs. |
| OSS-HDFS |
chmod | Changes the access permissions on files. |
| OSS-HDFS |
chown | Changes the owner of a file. |
| OSS-HDFS |
copyFromLocal | Copies files from your on-premises machine to an OSS bucket. Optional parameter: -f: specifies whether to perform forceful overwrite. |
| OSS and OSS-HDFS |
copyToLocal | Copies files from an OSS bucket to your on-premises machine. Optional parameter: -f: specifies whether to perform forceful overwrite. |
| OSS and OSS-HDFS |
createSnapshot | Creates snapshots. You must be authorized to use snapshots before you can run this command. |
| OSS and OSS-HDFS |
checkStoragePolicy | Queries the file storage policy. |
| OSS-HDFS |
deleteSnapshot | Deletes snapshots. |
| OSS-HDFS |
du | Queries the size of all files in a directory. Optional parameters:
|
| OSS and OSS-HDFS |
get | Downloads files to your on-premises machine. Optional parameter: -f: specifies whether to perform forceful overwrite. |
| OSS and OSS-HDFS |
getfacl | Queries the access control list (ACL) of a file or directory. Optional parameter: -R: specifies whether to use recursive display. |
| OSS-HDFS |
getfattr | Queries the extended property names and values of files or directories. Optional parameters:
|
| OSS-HDFS |
getStoragePolicy | Queries the storage policy. |
| OSS-HDFS |
ls | Lists all files in a directory. Optional parameter: -R: specifies whether to use recursive display. |
| OSS and OSS-HDFS |
listPolicies | Lists supported storage policies. |
| OSS-HDFS |
load | Caches data stored in a specific path to the local disks of a cluster. Then, you can read the data from local disks without the need to read data from backend storage systems such as OSS. Optional parameters:
|
| None |
mkdir | Creates a folder. |
| OSS and OSS-HDFS |
mv | Moves a file. |
| OSS and OSS-HDFS |
moveFromLocal | Moves a file from your on-premises machine to a remote path. After the file is successfully moved, the local file is deleted. |
| OSS and OSS-HDFS |
moveToLocal | Moves a file from a remote path to your on-premises machine. After the file is successfully moved, the file in the OSS bucket is deleted. |
| OSS and OSS-HDFS |
metaDiff | Queries the synchronization status between the local metadata and remote metadata after the cache-based acceleration system is used. |
| OSS and OSS-HDFS |
put | Copies a file from your on-premises machine to a remote directory. Optional parameter: -f: specifies whether to perform forceful overwrite. |
| OSS and OSS-HDFS |
rm | Deletes a file from a remote path. Optional parameters:
|
| OSS and OSS-HDFS |
rmdir | Deletes a folder. |
| OSS and OSS-HDFS |
test | Tests basic features. Optional parameters:
|
| OSS and OSS-HDFS |
renameSnapshot | Renames a snapshot. |
| OSS-HDFS |
restore | Restores files from the Archive or Cold Archive state. You must restore files in the Cold Archive or Archive state before you unarchive the files. Optional parameter: -days: the number of days during which files are restored. |
| OSS |
stat | Queries the file status. |
| OSS and OSS-HDFS |
setStoragePolicy | Specifies a storage policy for data in a path.
Note By default, if you do not specify a storage class for a file or subdirectory, the file or subdirectory inherits the storage class of its parent directory. For example, if the storage class of the oss://examplebucket/dir directory is CLOUD_STD and you do not specify a storage class for the oss://examplebucket/dir/subdir subdirectory, the storage class of the oss://examplebucket/dir/subdir subdirectory is also CLOUD_STD. |
| OSS-HDFS |
setfacl | Configures file access policies. Optional parameters:
Note This parameter is available only to users that are added to a whitelist. |
| OSS-HDFS |
setfattr | Configures the extended property names and values of files or directories. Optional parameters:
|
| OSS-HDFS |
sync | Uploads files from your on-premises machine to a remote path. Optional parameters:
|
| OSS and OSS-HDFS |
touchz | Generates a file whose size is 0 bytes. |
| OSS and OSS-HDFS |
truncate | Truncates a file to the specified size. |
| OSS-HDFS |
unarchive | Restores files to standard files. This operation is dedicated for archived files and code archived files. |
| OSS |
uncache | Deletes cached files from the cache system. |
| OSS and OSS-HDFS |
unsetStoragePolicy | Disables a storage policy. |
| OSS-HDFS |
jindo admin commands
Command | Description | Example | Scenario |
mount | Mounts an OSS or OSS-HDFS path. |
| OSS and OSS-HDFS |
report | Queries information about the JindoFSx storage acceleration system, such as the cache size and cache capacity. |
| OSS and OSS-HDFS |
reportMetrics | Queries metrics of the JindoFSx storage acceleration system. |
| OSS and OSS-HDFS |
umount | Unmounts an OSS or OSS-HDFS path. |
| OSS and OSS-HDFS |
addProxyUser | Adds proxy users. |
| OSS-HDFS |
allowSnapshot | Allows the use of snapshots. |
| OSS-HDFS |
addUserGroupsMapping | Adds mappings between users and user groups. |
| OSS-HDFS |
disallowSnapshot | Disallows the use of snapshots. |
| OSS-HDFS |
deleteProxyUser | Deletes proxy users. |
| OSS-HDFS |
deleteUserGroupsMapping | Deletes mappings between users and user groups. |
| OSS-HDFS |
dumpFile | Queries the detailed storage information about files. |
| OSS-HDFS |
dumpInventory | Exports file metadata. |
| OSS-HDFS |
dumpBlockFiles | Downloads all files in the specified folder to a local directory. |
| OSS-HDFS |
listProxyUsers | Lists proxy users. |
| OSS-HDFS |
listUserGroupsMappings | Lists mappings between all users and all user groups. |
| OSS-HDFS |
snapshotDiff | Queries differences between snapshots. |
| OSS-HDFS |
setRootPolicy | Configures an access path with a custom prefix for a bucket. |
| OSS-HDFS |
unsetRootPolicy | Deletes an access path with a custom prefix for a bucket. |
| OSS-HDFS |
listAccessPolicies | Queries all access paths that are supported by a bucket. |
| OSS-HDFS |