How can I use the CLI to check odrive status?

How can I use the CLI to check odrive status?

To use the CLI commands from Mac:

  1. Open a terminal session (type “terminal” in Spotlight search):

  2. Copy and paste the following command into the terminal and hit enter:
    python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status

This will return a summary of odrive status. To get more detailed you can add parameters to the status command like this:
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --uploads
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --downloads
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --waiting
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --trash
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --not_allowed



To use the CLI commands on Windows:

Open up a command prompt by clicking on the Windows icon in the taskbar, typing “cmd”, and then clicking on “Command Prompt”.

Once the command prompt is open, copy and paste the following command in (all one line) and hit enter. This will install the CLI for us to use in the next commands. It could take a minute or two to complete:

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";(New-Object System.Net.WebClient).DownloadFile(\"https://dl.odrive.com/odrivecli-win\", \"$comm_bin\oc.zip\");$shl=new-object -com shell.application; $shl.namespace(\"$comm_bin\").copyhere($shl.namespace(\"$comm_bin\oc.zip\").items(),0x10);del \"$comm_bin\oc.zip\";}"

This second command will query the odrive desktop status:

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status);}"

Then you can get detailed status on specific areas with these commands:

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status --uploads);}"

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status --downloads);}"

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status --trash);}"

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status --waiting);}"

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status --not_allowed);}"

powershell -command "& {$comm_bin=\"$HOME\.odrive\common\bin\";$o_cli_bin=\"$comm_bin\odrive.exe\";$(& \"$o_cli_bin\" status --mounts);}"



To use the CLI commands from Linux:

  1. Open a terminal session.

  2. Copy and paste the following command into the terminal and hit enter:
    python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status

This will return a summary of odrive status. To get more detailed you can add parameters to the status command like this:
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --uploads
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --downloads
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --waiting
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --trash
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py status --not_allowed