github.com/ncw/rclone@v1.48.1-0.20190724201158-a35aa1360e3e/docs/content/local.md (about) 1 --- 2 title: "Local Filesystem" 3 description: "Rclone docs for the local filesystem" 4 date: "2014-04-26" 5 --- 6 7 <i class="fa fa-file"></i> Local Filesystem 8 ------------------------------------------- 9 10 Local paths are specified as normal filesystem paths, eg `/path/to/wherever`, so 11 12 rclone sync /home/source /tmp/destination 13 14 Will sync `/home/source` to `/tmp/destination` 15 16 These can be configured into the config file for consistencies sake, 17 but it is probably easier not to. 18 19 ### Modified time ### 20 21 Rclone reads and writes the modified time using an accuracy determined by 22 the OS. Typically this is 1ns on Linux, 10 ns on Windows and 1 Second 23 on OS X. 24 25 ### Filenames ### 26 27 Filenames are expected to be encoded in UTF-8 on disk. This is the 28 normal case for Windows and OS X. 29 30 There is a bit more uncertainty in the Linux world, but new 31 distributions will have UTF-8 encoded files names. If you are using an 32 old Linux filesystem with non UTF-8 file names (eg latin1) then you 33 can use the `convmv` tool to convert the filesystem to UTF-8. This 34 tool is available in most distributions' package managers. 35 36 If an invalid (non-UTF8) filename is read, the invalid characters will 37 be replaced with the unicode replacement character, '�'. `rclone` 38 will emit a debug message in this case (use `-v` to see), eg 39 40 ``` 41 Local file system at .: Replacing invalid UTF-8 characters in "gro\xdf" 42 ``` 43 44 ### Long paths on Windows ### 45 46 Rclone handles long paths automatically, by converting all paths to long 47 [UNC paths](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath) 48 which allows paths up to 32,767 characters. 49 50 This is why you will see that your paths, for instance `c:\files` is 51 converted to the UNC path `\\?\c:\files` in the output, 52 and `\\server\share` is converted to `\\?\UNC\server\share`. 53 54 However, in rare cases this may cause problems with buggy file 55 system drivers like [EncFS](https://github.com/ncw/rclone/issues/261). 56 To disable UNC conversion globally, add this to your `.rclone.conf` file: 57 58 ``` 59 [local] 60 nounc = true 61 ``` 62 63 If you want to selectively disable UNC, you can add it to a separate entry like this: 64 65 ``` 66 [nounc] 67 type = local 68 nounc = true 69 ``` 70 And use rclone like this: 71 72 `rclone copy c:\src nounc:z:\dst` 73 74 This will use UNC paths on `c:\src` but not on `z:\dst`. 75 Of course this will cause problems if the absolute path length of a 76 file exceeds 258 characters on z, so only use this option if you have to. 77 78 ### Symlinks / Junction points 79 80 Normally rclone will ignore symlinks or junction points (which behave 81 like symlinks under Windows). 82 83 If you supply `--copy-links` or `-L` then rclone will follow the 84 symlink and copy the pointed to file or directory. Note that this 85 flag is incompatible with `-links` / `-l`. 86 87 This flag applies to all commands. 88 89 For example, supposing you have a directory structure like this 90 91 ``` 92 $ tree /tmp/a 93 /tmp/a 94 ├── b -> ../b 95 ├── expected -> ../expected 96 ├── one 97 └── two 98 └── three 99 ``` 100 101 Then you can see the difference with and without the flag like this 102 103 ``` 104 $ rclone ls /tmp/a 105 6 one 106 6 two/three 107 ``` 108 109 and 110 111 ``` 112 $ rclone -L ls /tmp/a 113 4174 expected 114 6 one 115 6 two/three 116 6 b/two 117 6 b/one 118 ``` 119 120 #### --links, -l 121 122 Normally rclone will ignore symlinks or junction points (which behave 123 like symlinks under Windows). 124 125 If you supply this flag then rclone will copy symbolic links from the local storage, 126 and store them as text files, with a '.rclonelink' suffix in the remote storage. 127 128 The text file will contain the target of the symbolic link (see example). 129 130 This flag applies to all commands. 131 132 For example, supposing you have a directory structure like this 133 134 ``` 135 $ tree /tmp/a 136 /tmp/a 137 ├── file1 -> ./file4 138 └── file2 -> /home/user/file3 139 ``` 140 141 Copying the entire directory with '-l' 142 143 ``` 144 $ rclone copyto -l /tmp/a/file1 remote:/tmp/a/ 145 ``` 146 147 The remote files are created with a '.rclonelink' suffix 148 149 ``` 150 $ rclone ls remote:/tmp/a 151 5 file1.rclonelink 152 14 file2.rclonelink 153 ``` 154 155 The remote files will contain the target of the symbolic links 156 157 ``` 158 $ rclone cat remote:/tmp/a/file1.rclonelink 159 ./file4 160 161 $ rclone cat remote:/tmp/a/file2.rclonelink 162 /home/user/file3 163 ``` 164 165 Copying them back with '-l' 166 167 ``` 168 $ rclone copyto -l remote:/tmp/a/ /tmp/b/ 169 170 $ tree /tmp/b 171 /tmp/b 172 ├── file1 -> ./file4 173 └── file2 -> /home/user/file3 174 ``` 175 176 However, if copied back without '-l' 177 178 ``` 179 $ rclone copyto remote:/tmp/a/ /tmp/b/ 180 181 $ tree /tmp/b 182 /tmp/b 183 ├── file1.rclonelink 184 └── file2.rclonelink 185 ```` 186 187 Note that this flag is incompatible with `-copy-links` / `-L`. 188 189 ### Restricting filesystems with --one-file-system 190 191 Normally rclone will recurse through filesystems as mounted. 192 193 However if you set `--one-file-system` or `-x` this tells rclone to 194 stay in the filesystem specified by the root and not to recurse into 195 different file systems. 196 197 For example if you have a directory hierarchy like this 198 199 ``` 200 root 201 ├── disk1 - disk1 mounted on the root 202 │ └── file3 - stored on disk1 203 ├── disk2 - disk2 mounted on the root 204 │ └── file4 - stored on disk12 205 ├── file1 - stored on the root disk 206 └── file2 - stored on the root disk 207 ``` 208 209 Using `rclone --one-file-system copy root remote:` will only copy `file1` and `file2`. Eg 210 211 ``` 212 $ rclone -q --one-file-system ls root 213 0 file1 214 0 file2 215 ``` 216 217 ``` 218 $ rclone -q ls root 219 0 disk1/file3 220 0 disk2/file4 221 0 file1 222 0 file2 223 ``` 224 225 **NB** Rclone (like most unix tools such as `du`, `rsync` and `tar`) 226 treats a bind mount to the same device as being on the same 227 filesystem. 228 229 **NB** This flag is only available on Unix based systems. On systems 230 where it isn't supported (eg Windows) it will be ignored. 231 232 <!--- autogenerated options start - DO NOT EDIT, instead edit fs.RegInfo in backend/local/local.go then run make backenddocs --> 233 ### Standard Options 234 235 Here are the standard options specific to local (Local Disk). 236 237 #### --local-nounc 238 239 Disable UNC (long path names) conversion on Windows 240 241 - Config: nounc 242 - Env Var: RCLONE_LOCAL_NOUNC 243 - Type: string 244 - Default: "" 245 - Examples: 246 - "true" 247 - Disables long file names 248 249 ### Advanced Options 250 251 Here are the advanced options specific to local (Local Disk). 252 253 #### --copy-links 254 255 Follow symlinks and copy the pointed to item. 256 257 - Config: copy_links 258 - Env Var: RCLONE_LOCAL_COPY_LINKS 259 - Type: bool 260 - Default: false 261 262 #### --links 263 264 Translate symlinks to/from regular files with a '.rclonelink' extension 265 266 - Config: links 267 - Env Var: RCLONE_LOCAL_LINKS 268 - Type: bool 269 - Default: false 270 271 #### --skip-links 272 273 Don't warn about skipped symlinks. 274 This flag disables warning messages on skipped symlinks or junction 275 points, as you explicitly acknowledge that they should be skipped. 276 277 - Config: skip_links 278 - Env Var: RCLONE_LOCAL_SKIP_LINKS 279 - Type: bool 280 - Default: false 281 282 #### --local-no-unicode-normalization 283 284 Don't apply unicode normalization to paths and filenames (Deprecated) 285 286 This flag is deprecated now. Rclone no longer normalizes unicode file 287 names, but it compares them with unicode normalization in the sync 288 routine instead. 289 290 - Config: no_unicode_normalization 291 - Env Var: RCLONE_LOCAL_NO_UNICODE_NORMALIZATION 292 - Type: bool 293 - Default: false 294 295 #### --local-no-check-updated 296 297 Don't check to see if the files change during upload 298 299 Normally rclone checks the size and modification time of files as they 300 are being uploaded and aborts with a message which starts "can't copy 301 - source file is being updated" if the file changes during upload. 302 303 However on some file systems this modification time check may fail (eg 304 [Glusterfs #2206](https://github.com/ncw/rclone/issues/2206)) so this 305 check can be disabled with this flag. 306 307 - Config: no_check_updated 308 - Env Var: RCLONE_LOCAL_NO_CHECK_UPDATED 309 - Type: bool 310 - Default: false 311 312 #### --one-file-system 313 314 Don't cross filesystem boundaries (unix/macOS only). 315 316 - Config: one_file_system 317 - Env Var: RCLONE_LOCAL_ONE_FILE_SYSTEM 318 - Type: bool 319 - Default: false 320 321 <!--- autogenerated options stop -->