CLI Guidelines to Sync Entire Folder Contents


I am searching for a way to utilize the CLI to sync an entire folder’s contents. I have everything lined up on a raspberry pi, but I have to keep typing in individual file names to sync. Is there any way to wild card file names or something to avoid have to manually sync each file by name?

Any help would be appreciated.



1 Like

Hi @brian.michaud1,
If you want to recursively download an entire folder (and its subfolders) you can use the following command. This assumes you installed using the steps in our documentation ( ):

exec 6>&1;num_procs=4;output="go"; while [ "$output" ]; do output=$(find "$HOME/odrive-agent-mount/path/to/folder/here" -name "*.cloud*" -print0 | xargs -0 -n 1 -P $num_procs python "$HOME/.odrive-agent/bin/" sync | tee /dev/fd/6); done

This will download everything, recursively, in “$HOME/odrive-agent-mount/path/to/folder/here” using 4 threads. You would need to replace “$HOME/odrive-agent-mount/path/to/folder/here” with the path to the folder you are trying to sync.

1 Like