支持主流的 Linux 系统 FreeBSD 以及 Docker 镜像: Can run on all major Linux distributions, FreeBSD, or as a Docker container.
支持单向/双向同步功能: Supports one-way and two-way sync capabilities.
软件状态监测: State caching.
基于 inotify 的实时文件监控: Real-Time local file monitoring with inotify.
通过钩子实时远端同步: Real-Time syncing of remote updates via webhooks.
保证文件安全: File upload / download validation to ensure data integrity.
支持断点上传: Resumable uploads.
支持 OneDrive for Business, OneDrive for Personal, OneDrive for Office365 and SharePoint.
基于 libnotify 的桌面通知: Desktop notifications via libnotify.
可用于测试的 Dry-run: Dry-run capability to test configuration changes.
防止配置更改后的数据丢失: Prevent major OneDrive accidental data deletion after configuration change.
国内支持度较好: Support for National cloud deployments (Microsoft Cloud for US Government, Microsoft Cloud Germany, Azure and Office 365 operated by 21Vianet in China)
支持多用户: Supports single & multi-tenanted applications .
支持速度配置: Supports rate limiting of traffic.
待开发
加密功能, 现阶段可以通过别的加密软件实现,例如 Cryptomator: Ability to encrypt/decrypt files on-the-fly when uploading/downloading files from OneDrive.
像 Windows 上实现即用即下载打开: Support for Windows ‘On-Demand’ functionality so file is only downloaded when accessed locally,.
Run `source ~/dlang/dmd-2.087.0/activate` in your shell to use dmd-2.087.0. This will setup PATH, LIBRARY_PATH, LD_LIBRARY_PATH, DMD, DC, and PS1. Run `deactivate` later on to restore your environment.
但是我下载的是 dmd v2.090.1 版本, 不需要进行上面的动作也实际成功了.
具体过程:
1 2 3 4 5 6
git clone https://github.com/abraunegg/onedrive.git cd onedrive ./configure make clean; make; sudo make install onedrive --version #检查安装成功与否以及安装版本
编译选项
1 2 3 4 5
--enable-notifications #允许通知 --with-systemdsystemunitdir --with-systemduserunitdir # 配置 Systemd service files 位置 --enable-debug --enable-completions #安装完成的信号传给 bash, zsh and fish
卸载
1 2 3
cd onedrive sudo make uninstall rm -rf ~/.config/onedrive #删除配置文件
Usage: onedrive [options] --synchronize Do a one time synchronization onedrive [options] --monitor Monitor filesystem and sync regularly onedrive [options] --display-config Display the currently used configuration onedrive [options] --display-sync-status Query OneDrive service and report on pending changes onedrive -h | --help Show this help screen onedrive --version Show version
Options:
--auth-files Perform authentication not via interactive dialog but via files read/writes to these files. --auth-response Perform authentication not via interactive dialog but via providing the reponse url directly. --check-for-nomount Check for the presence of .nosync in the syncdir root. If found, do not perform sync. --check-for-nosync Check for the presence of .nosync in each directory. If found, skip directory from sync. --classify-as-big-delete Number of children in a path that is locally removed which will be classified as a 'big data delete' --confdir ARG Set the directory used to store the configuration files --create-directory ARG Create a directory on OneDrive - no sync will be performed. --create-share-link ARG Create a shareable link for an existing file on OneDrive --debug-https Debug OneDrive HTTPS communication. --destination-directory ARG Destination directory for renamed or move on OneDrive - no sync will be performed. --disable-download-validation Disable download validation when downloading from OneDrive --disable-notifications Do not use desktop notifications in monitor mode. --disable-upload-validation Disable upload validation when uploading to OneDrive --display-config Display what options the client will use as currently configured - no sync will be performed. --display-sync-status Display the sync status of the client - no sync will be performed. --download-only Replicate the OneDrive online state locally, by only downloading changes from OneDrive. Do not upload local changes to OneDrive. --dry-run Perform a trial sync with no changes made --enable-logging Enable client activity to a separate log file --force Force the deletion of data when a 'big delete' is detected --force-http-2 Force the use of HTTP/2 for all operations where applicable --get-O365-drive-id ARG Query and return the Office 365 Drive ID for a given Office 365 SharePoint Shared Library --get-file-link ARG Display the file link of a synced file --help -h This help information. --list-shared-folders List OneDrive Business Shared Folders --local-first Synchronize from the local directory source first, before downloading changes from OneDrive. --log-dir ARG Directory where logging output is saved to, needs to end with a slash. --logout Logout the current user --min-notify-changes ARG Minimum number of pending incoming changes necessary to trigger a desktop notification --monitor -m Keep monitoring forlocal and remote changes --monitor-fullscan-frequency ARG Number of sync runs before performing a full local scan of the synced directory --monitor-interval ARG Number of seconds by which each sync operation is undertaken when idle under monitor mode. --monitor-log-frequency ARG Frequency of logging in monitor mode --no-remote-delete Do not delete local file 'deletes' from OneDrive when using --upload-only --operation-timeout Maximum amount of time (in seconds) an operation is allowed to take --print-token Print the access token, useful for debugging --remove-directory ARG Remove a directory on OneDrive - no sync will be performed. --remove-source-files Remove source file after successful transfer to OneDrive when using --upload-only --resync Forget the last saved state, perform a full sync --single-directory ARG Specify a single local directory within the OneDrive root to sync. --skip-dir Skip any directories that match this pattern from syncing --skip-dir-strict-match When matching skip_dir directories, only match explicit matches --skip-dot-files Skip dot files and folders from syncing --skip-file ARG Skip any files that match this pattern from syncing --skip-size Skip new files larger than this size (in MB) --skip-symlinks Skip syncing of symlinks --source-directory ARG Source directory to rename or move on OneDrive - no sync will be performed. --sync-root-files Sync all files in sync_dir root when using sync_list. --sync-shared-folders Sync OneDrive Business Shared Folders --syncdir ARG Specify the local directory used for synchronization to OneDrive --synchronize Perform a synchronization --upload-only Replicate the locally configured sync_dir state to OneDrive, by only uploading local changes to OneDrive. Do not download changes from OneDrive. --user-agent ARG Specify a User Agent string to the http client --verbose -v+ Print more details, useful for debugging (repeat for extra debugging) --version Print the version and exit