acd_cli may be invoked as
Most actions need the node cache to be initialized and up-to-date, so please run a sync. An ordinary sync will fetch the changes since the last sync or the full node list if the cache is empty. Partially syncing will only fetch the active contents of one folder, optionally recursively.
The following actions are built in
sync (s) refresh node cache; prerequisite for many actions psync only refresh the contents of the specified folder clear-cache (cc) clear node cache [offline operation] tree (t) print directory tree [offline operation] children (ls) list a folder's children [offline operation] find (f) find nodes by name [offline operation] [case insensitive] find-md5 (fm) find files by MD5 hash [offline operation] find-regex (fr) find nodes by regular expression [offline operation] [case insensitive] upload (ul) file and directory upload to a remote destination overwrite (ov) overwrite file A [remote] with content of file B [local] stream (st) upload the standard input stream to a file download (dl) download a remote folder or file; will skip existing local files cat output a file to the standard output stream create (c, mkdir) create folder using an absolute path list-trash (lt) list trashed nodes [offline operation] trash (rm) move node to trash restore (re) restore node from trash move (mv) move node A into folder B rename (rn) rename a node resolve (rs) resolve a path to a node ID [offline operation] usage (u) show drive usage data quota (q) show drive quota [raw JSON] metadata (m) print a node's metadata [raw JSON] mount mount the drive at a local directory umount unmount drive(s)
acd_cli --help to get a current list of the available actions. A list of further
arguments of an action and their order can be printed by calling
acd_cli [action] --help.
Most node arguments may be specified as a 22 character ID or a UNIX-style path. Trashed nodes’ paths might not be able to be resolved correctly; use their ID instead.
Logs will automatically be saved into the cache directory.
-d) will print additional messages to standard error.
-nl) will disable the automatic logging feature that saves log files to the
--color will set the coloring mode according to the specified argument (
always). Coloring is turned off by default; it is used for file/folder listings.
-c) sets the start-up database integrity check mode. The default is to perform a
full check. Setting the check to
none may speed up the initialization for
-u) will force the output to be encoded in UTF-8, regardless
of the system’s settings.
When the script is done running, its exit status can be checked for flags. If no error occurs, the exit status will be 0. Possible flag values are:
|failed file transfer||8|
|error creating folder||64|
|file size mismatch||128|
|error deleting source file||4096|
If multiple errors occur, their respective flag values will be compounded into the exit status value by a binary OR operation. Because exit status values may not be larger than 255, flags 256 and above cannot be returned via exit status. A warning message will be displayed at the end of execution if those errors occurred.