Command Line Interface
megfile
Client
megfile [OPTIONS] COMMAND [ARGS]...
Options
-
--debug Enable debug mode.
cat
Concatenate any files and send them to stdout.
megfile cat [OPTIONS] PATH
Arguments
-
PATH Required argument
config
Return the config file
megfile config [OPTIONS] COMMAND [ARGS]...
s3
Return the config file for s3
megfile config s3 [OPTIONS] AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
Options
-
-p,--path<path> s3 config file, default is $HOME/.aws/credentials
-
-n,--profile-name<profile_name> s3 config file
-
-e,--endpoint-url<endpoint_url> endpoint-url
-
-s,--addressing-style<addressing_style> addressing-style
-
--no-cover Not cover the same-name config
Arguments
-
AWS_ACCESS_KEY_ID Required argument
-
AWS_SECRET_ACCESS_KEY Required argument
cp
Copy files from source to dest, skipping already copied.
megfile cp [OPTIONS] SRC_PATH DST_PATH
Options
-
-r,--recursive Command is performed on all files or objects under the specified directory or prefix.
-
-T,--no-target-directory treat dst_path as a normal file.
-
-g,--progress-bar Show progress bar.
Arguments
-
SRC_PATH Required argument
-
DST_PATH Required argument
head
Concatenate any files and send first n lines of them to stdout.
megfile head [OPTIONS] PATH
Options
-
-n,--lines<lines> print the first NUM lines
Arguments
-
PATH Required argument
ls
List all the objects in the path.
megfile ls [OPTIONS] PATH
Options
-
-l,--long List all the objects in the path with size, modification time and path.
-
-r,--recursive Command is performed on all files or objects under the specified directory or prefix.
-
-h,--human-readable Displays file sizes in human readable format.
Arguments
-
PATH Required argument
md5sum
Produce an md5sum file for all the objects in the path.
megfile md5sum [OPTIONS] PATH
Arguments
-
PATH Required argument
mkdir
Make the path if it doesn’t already exist.
megfile mkdir [OPTIONS] PATH
Arguments
-
PATH Required argument
mtime
Return the mtime and number of objects in remote:path.
megfile mtime [OPTIONS] PATH
Arguments
-
PATH Required argument
mv
Move files from source to dest.
megfile mv [OPTIONS] SRC_PATH DST_PATH
Options
-
-r,--recursive Command is performed on all files or objects under the specified directory or prefix.
-
-T,--no-target-directory treat dst_path as a normal file.
-
-g,--progress-bar Show progress bar.
Arguments
-
SRC_PATH Required argument
-
DST_PATH Required argument
rm
Remove files from path.
megfile rm [OPTIONS] PATH
Options
-
-r,--recursive Command is performed on all files or objects under the specified directory or prefix.
Arguments
-
PATH Required argument
size
Return the total size and number of objects in remote:path.
megfile size [OPTIONS] PATH
Arguments
-
PATH Required argument
stat
Return the stat and number of objects in remote:path.
megfile stat [OPTIONS] PATH
Arguments
-
PATH Required argument
sync
Make source and dest identical, modifying destination only.
megfile sync [OPTIONS] SRC_PATH DST_PATH
Options
-
-g,--progress-bar Show progress bar.
-
-w,--worker<worker> Number of concurrent workers.
-
-f,--force Copy files forcely, ignore same files.
-
-q,--quiet Not show any progress log.
Arguments
-
SRC_PATH Required argument
-
DST_PATH Required argument
tail
Concatenate any files and send last n lines of them to stdout.
megfile tail [OPTIONS] PATH
Options
-
-n,--lines<lines> print the last NUM lines
Arguments
-
PATH Required argument
to
Write bytes from stdin to file.
megfile to [OPTIONS] PATH
Options
-
-a,--append Append to the given file
-
-o,--stdout File content to standard output
Arguments
-
PATH Required argument
touch
Make the file if it doesn’t already exist.
megfile touch [OPTIONS] PATH
Arguments
-
PATH Required argument
version
Return the megfile version.
megfile version [OPTIONS]