Skip to content

Latest commit

 

History

History
88 lines (80 loc) · 2.6 KB

Command-Line-Interface.md

File metadata and controls

88 lines (80 loc) · 2.6 KB
layout title
global
Command Line Interface

Tachyon's command line interface gives users access to basic file system operations. Invoke the command line utility with the script:

./bin/tachyon tfs

All "path" variables in tfs commands should start with

tachyon://<master node address>:<master node port>/<path>

Or, if no header is provided, the default hostname and port (set in the env file) will be used.

/<path>

#List of Operations

OperationSyntaxDescription
cat cat "path" Print the content of the file to the console.
count count "path" Display the number of folders and files matching the specified prefix in "path".
ls ls "path" List all the files and directories directly under the given path with information such as size.
lsr lsr "path" Recursively list all the files and directories directly under the given path with information such as size.
mkdir mkdir "path" Create a directory under the given path, and creates any necessary parent directories. Will fail if the path is already in use.
rm rm "path" Remove a file or directory and all folders and files under that directory.
tail tail "path" Print the last 1KB of the specified file to the console.
touch touch "path" Create a 0 byte file at the specified location.
mv mv "source" "destination" Move a file or directory specified by "source" to a new path "destination". Will fail if "destination" is already in use.
copyFromLocal copyFromLocal "source path" "remote path" Copy the specified file to the path specified by "remote path". Will fail if "remote path" is already in use.
copyToLocal copyToLocal "remote path" "local path" Copy the specified file from the path specified by "remote source" to a local destination.
fileinfo fileinfo "path" Print the information of the blocks of a specified file.
location location "path" List the nodes where the file specified by "path" can be found.