1ONEDRIVE(1) User Commands ONEDRIVE(1)
2
3
4
6 onedrive - folder synchronization with OneDrive
7
9 onedrive [OPTION] --synchronize
10 onedrive [OPTION] --monitor
11 onedrive [OPTION] --display-config
12 onedrive [OPTION] --display-sync-status
13
15 A complete tool to interact with OneDrive on Linux.
16
18 Without any option given, no sync is done and the program exits.
19
20 --auth-files ARG
21 Perform authorization via two files passed in as ARG in the for‐
22 mat authUrl:responseUrl. The authorization URL is written to
23 the authUrl, then onedrive waits for the file responseUrl to be
24 present, and reads the response from that file.
25
26 --check-for-nomount
27 Check for the presence of .nosync in the syncdir root. If found,
28 do not perform sync.
29 Configuration file key: check_nomount (default: false)
30
31 --check-for-nosync
32 Check for the presence of .nosync in each directory. If found,
33 skip directory from sync.
34 Configuration file key: check_nosync (default: false)
35
36 --confdir ARG
37 Set the directory used to store the configuration files
38
39 --create-directory ARG
40 Create a directory on OneDrive - no sync will be performed.
41
42 --destination-directory ARG
43 Destination directory for renamed or move on OneDrive - no sync
44 will be performed.
45
46 --debug-https
47 Debug OneDrive HTTPS communication.
48 Configuration file key: debug_https (default: false)
49
50 --disable-notifications
51 Do not use desktop notifications in monitor mode
52 Configuration file key: disable_notifications (default: false)
53
54 --disable-upload-validation
55 Disable upload validation when uploading to OneDrive
56 Configuration file key: disable_upload_validation (default:
57 false)
58
59 --display-config
60 Display what options the client will use as currently configured
61 - no sync will be performed.
62
63 --display-sync-status
64 Display the sync status of the client - no sync will be per‐
65 formed.
66
67 --download-only
68 Only download remote changes
69 Configuration file key: download_only (default: false)
70
71 --dry-run
72 Perform a trial sync with no changes made. Can ONLY be used with
73 --synchronize. Will be ignored for --monitor
74 Configuration file key: dry_run (default: false)
75
76 --enable-logging
77 Enable client activity to a separate log file
78 Configuration file key: enable_logging (default: false)
79
80 --force-http-1.1
81 Force the use of HTTP 1.1 for all operations (DEPRECIATED)
82 Configuration file key: force_http_11 (default: false)
83
84 --force-http-2
85 Force the use of HTTP/2 for all operations where applicable
86 Configuration file key: force_http_2 (default: false)
87
88 --get-O365-drive-id ARG
89 Query and return the Office 365 Drive ID for a given Office 365
90 SharePoint Shared Library
91
92 --get-file-link ARG
93 Display the file link of a synced file
94
95 --local-first
96 Synchronize from the local directory source first, before down‐
97 loading changes from OneDrive.
98 Configuration file key: local_first (default: false)
99
100 --logout
101 Logout the current user
102
103 --log-dir ARG
104 defines the directory where logging output is saved to, needs to
105 end with a slash
106 Configuration file key: log_dir (default: /var/log/onedrive/)
107
108 --min-notify-changes
109 the minimum number of pending incoming changes necessary to
110 trigger a desktop notification
111 Configuration file key: min_notify_changes (default: 5)
112
113 -m --monitor
114 Keep monitoring for local and remote changes
115
116 --monitor-interval ARG
117 The number of seconds by which each sync operation is undertaken
118 when idle under monitor mode
119 Configuration file key: monitor_interval (default: 45)
120
121 --monitor-fullscan-frequency ARG
122 Number of sync runs before performing a full local scan of the
123 synced directory
124 Configuration file key: monitor_fullscan_frequency (default: 10)
125
126 --no-remote-delete
127 Do not delete local file 'deletes' from OneDrive when using
128 --upload-only
129 Configuration file key: no_remote_delete (default: false)
130
131 --print-token
132 Print the access token, useful for debugging
133
134 --resync
135 Forget the last saved state, perform a full sync
136
137 --remove-directory ARG
138 Remove a directory on OneDrive - no sync will be performed.
139
140 --single-directory ARG
141 Specify a single local directory within the OneDrive root to
142 sync.
143
144 --skip-dot-files
145 Skip dot files and folders from syncing
146 Configuration file key: skip_dotfiles (default: false)
147
148 --skip-file
149 Skip any files that match this pattern from syncing
150 Configuration file key: skip_file (default: ~*|.~*|*.tmp)
151
152 --skip-symlinks
153 Skip syncing of symlinks
154 Configuration file key: skip_symlinks (default: false)
155
156 --source-directory ARG
157 Source directory to rename or move on OneDrive - no sync will be
158 performed.
159
160 --sync-root-files
161 Sync all files in sync_dir root when using sync_list.
162
163 --syncdir ARG
164 Set the directory used to sync the files that are synced
165 Configuration file key: sync_dir (default: ~/OneDrive)
166
167 --synchronize
168 Perform a synchronization
169
170 --upload-only
171 Only upload to OneDrive, do not sync changes from OneDrive
172 locally
173 Configuration file key: upload_only (default: false)
174
175 --user-agent ARG
176 Set the used User Agent identifier
177 Configuration file key: user_agent (default: don't change)
178
179 -v --verbose
180 Print more details, useful for debugging. Given two times (or
181 more) enables even more verbose debug statements.
182
183 --version
184 Print the version and exit
185
186 -h --help
187 This help information.
188
190 State caching
191
192 Real-Time file monitoring with Inotify
193
194 Resumable uploads
195
196 Support OneDrive for Business (part of Office 365)
197
198 Shared folders (OneDrive Personal)
199
200 SharePoint / Office 365 Group Drives (refer to README.Office365.md to
201 configure)
202
203
204
206 You should copy the default config file into your home directory before
207 making changes:
208 mkdir -p ~/.config/onedrive
209 cp @DOCDIR@/config ~/.config/onedrive/config
210
211 For the supported options see the above list of command line options
212 for the availability of a configuration key.
213
214 Pattern are case insensitive. * and ? wildcards characters are sup‐
215 ported. Use | to separate multiple patterns.
216
217 After changing the filters (skip_file or skip_dir in your configs) you
218 must execute onedrive --synchronize --resync.
219
220
222 After installing the application you must run it at least once from the
223 terminal to authorize it.
224
225 You will be asked to open a specific link using your web browser where
226 you will have to login into your Microsoft Account and give the appli‐
227 cation the permission to access your files. After giving the permis‐
228 sion, you will be redirected to a blank page. Copy the URI of the blank
229 page into the application.
230
231
232
234 Service files are installed into user and system directories.
235
236 OneDrive service running as root user
237 To enable this mode, run as root user
238 systemctl enable onedrive
239 systemctl start onedrive
240
241
242 OneDrive service running as root user for a non-root user
243 This mode allows starting the OneDrive service automatically
244 with system start for multiple users. For each <username> run:
245 systemctl enable onedrive@<username>
246 systemctl start onedrive@<username>
247
248
249 OneDrive service running as non-root user
250 In this mode the service will be started when the user logs in.
251 Run as user
252 systemctl --user enable onedrive
253 systemctl --user start onedrive
254
255
257 When running onedrive all actions can be logged to a separate log file.
258 This can be enabled by using the --enable-logging flag. By default,
259 log files will be written to /var/log/onedrive.
260
261 All logfiles will be in the format of %username%.onedrive.log, where
262 %username% represents the user who ran the client.
263
264
265
267 If OneDrive has been compiled with support for notifications, a running
268 onedrive in monitor mode will send notifications about initialization
269 and errors via libnotify to the dbus.
270
271 Note that this does not work if onedrive is started as root for a user
272 via the onedrive@<username> service.
273
274
276 Further examples and documentation is available in README.md
277 README.Office365.md
278
279
280
281v2.3.10 October 2019 ONEDRIVE(1)