iCloud Drive Tips & Tricks
Tags: icloud
Published: 2024-02-27 16:05:14

---
title: iCloud Drive Tips & Tricks
published: true
date: 2024-02-23 15:56:40 UTC
tags: iCloud
canonical_url: https://wesleydegroot.nl/blog/post/iCloud-drive-tips-and-tricks
---

<h3><strong>What Is iCloud Drive?</strong></h3> <p>iCloud Drive is Apple's cloud-based file storage and synchronization service. It allows you to store, organize, and collaborate on files and folders across all your Apple devices. Whether you're using a Mac, iPhone, iPad, or even accessing your files via iCloud.com, iCloud Drive ensures seamless synchronization.<br> iCloud Drive simplifies file management, collaboration, and access across your Apple ecosystem. Whether you're a student, professional, or creative, harness the power of iCloud Drive to keep your digital life organized and connected.</p> <h2>Must know commandline commands</h2> <p><strong>Download ‘all’ files in the current &amp; sub folders.</strong><br> <code>find . -type f -name "\*.icloud" -exec brctl download “{}” \;</code></p> <p><strong>Download a specific file:</strong><br> <code>brctl download filename</code></p> <p><strong>Remove the local download of a file</strong><br> <code>brctl evict filename</code></p> <p><strong>View iCloud log:</strong><br> <code>brctl log -w --shorten</code></p> <p><strong>Diagnose errors:</strong><br> <code>brctl diagnose</code></p> <h2>Debugging &amp; more</h2> <p>If you are having issues with iCloud Drive, you can use the following commands in terminal to help diagnose the problem.</p> <p><strong>Check iCloud Progress:</strong><br> <code>brctl monitor com.apple.CloudDocs|grep %</code></p> <p><strong>Check iCloud Download Progress:</strong><br> <code>brctl monitor com.apple.CloudDocs|grep ↓</code></p> <p><strong>Check iCloud Upload Progress:</strong><br> <code>brctl monitor com.apple.CloudDocs|grep ↑</code></p> <p><strong>Check iCloud Errors:</strong><br> <code>brctl log -w --shorten</code></p> <p><strong>Check iCloud Diagnose:</strong><br> <code>brctl diagnose</code></p> <p><strong>Check iCloud Status:</strong><br> <code>brctl status</code></p> <h2>Full list of commands</h2> <p><code>brctl</code> is the command line tool for iCloud Drive. Here is a full list of commands:</p> <pre><code>╭── 👤 wesley 📂 ~/d/w/wesleydegroot.nl/blog/ ╰─&gt; brctl Usage: brctl &lt;command&gt; [command-options and arguments] -h,--help show this help COMMANDS diagnose [options] [--doc|-d &lt;document-path&gt;] [&lt;diagnosis-output-path&gt;] diagnose and collect logs -M,--collect-mobile-documents[=&lt;container&gt;] (default: all containers) -s,--sysdiagnose Do not collect what's already part of sysdiagnose -t,--uitest Collect logs for UI tests -n,--name=&lt;name&gt; Change the device name -f,--full Do a full diagnose, including server checks -d,--doc=&lt;document-path&gt; Collect additional information about the document at that path. Helps when investigating an issue impacting a specific document. -e,--no-reveal Do not reveal diagnose in the Finder when done [&lt;diagnosis-output-path&gt;] Specifies the output path of the diagnosis; -n becomes useless. log [options] [&lt;command&gt;] -a,--all Show all system logs -p,--predicate Additional predicate (see `log help predicates`) -x,--process &lt;name&gt; Filter events from the specified process -d,--path=&lt;logs-dir&gt; Use &lt;logs-dir&gt; instead of default --last num [m|h|d] Limits the captured events to the period starting at the given interval ago from the current time -S,--start="YYYY-MM-DD HH:MM:SS" Start log dump from a specified date -E,--end="YYYY-MM-DD HH:MM:SS" Stop log dump after a specified date -b     Show CloudDocs logs -f     Show FileProvider related logs -F Show FruitBasket related logs -N Show network related logs (should be used in conjonction with another flag) -g     Show Genstore related logs -i Show SQL and CloudDocs logs -o Show local storage logs -D Show logs from the Denator subsystem -z,--local-timezone Display timestamps within local timezone --dark-mode Adapt color scheme to dark mode terminal -q,--quick Print logs without heavy pre-processing dump [options] [&lt;container&gt;] dump the CloudDocs database -o,--output=&lt;file-path&gt; redirect output to &lt;file-path&gt; -d,--database-path=&lt;db-path&gt; Use the database at &lt;db-path&gt; -e,--enterprise Use the Data Separated database -i,--itemless Don't dump items from the db -u,--upgrade Upgrade the db if necessary before dumping [&lt;container&gt;] the container to be dumped status [&lt;containers&gt;] Prints items which haven't been completely synced up / applied to disk [&lt;container&gt;] the container to be dumped accounts [options] Displays iCloudDrive eligible accounts and their logged in/out status and directory name -w,--wait wait for logged in accounts to load quota Displays the available quota in the account monitor [options] [&lt;container&gt; ...] monitor activity -g dump global activity of the iCloud Drive -i dump changes incrementally -t amount of time in seconds to run the query, the query will stop after the specified time -S,--scope=&lt;scope&gt; restrict the NSMetadataQuery scope to docs, data, external or a combination [&lt;container&gt; ...] list of containers to monitor, ignored when -g is used</code></pre> <h4>Help</h4> <p>Something isn't working!</p> <details> <summary>Finder freezes</summary> Sometimes this can happen, especially when you have a lot of files in your iCloud Drive. You can try to find the file causing Finder to freeze by using the following command <code>brctl monitor com.apple.CloudDocs|grep % </code>, this will show you the progress of the files being downloaded. If you see a file that is stuck for a long time, you can try to download it manually by using the following command <code>brctl download filename</code>. If that doesn't work, you can try to remove the local download of the file by using the following command <code>brctl evict filename</code>. This will remove the local download of the file and try to download it again. If that doesn't work, you can try to diagnose the issue by using the following command <code>brctl diagnose</code>. This will collect logs and diagnose the issue. If you still can't find the issue, you can try to contact Apple Support for further assistance.</details> <details> <summary>I unzipped a masively big zip and now the contents of the folder are not shown anymore (e.g. on the Desktop)</summary> Go to <a href='https://www.icloud.com/iclouddrive'>https://www.icloud.com/iclouddrive</a> and delete the files. </details> <h4>Tips</h4> <ul> <li>Do not use a lot of non-standard characters in your file names. This can cause issues with iCloud Drive.</li> <li>Do not end your file names with a space. This can cause issues with iCloud Drive.</li> <li>Do not save development folders like <code>node\_modules</code> or <code>.git</code> in your iCloud Drive. This can take up a lot of space and cause issues with iCloud Drive.</li> <li>Do not use iCloud Drive as a backup solution. It's not designed for that and you can lose your files if you're not careful.</li> </ul> <h4>Conclusion</h4> <p>i love iCloud Drive and it's features. It's a great way to keep all your files in sync and available on all your devices.<br> Unfortunately, it's not always working as expected. But with the above commands you can diagnose and fix most of the issues.<br> I hope this article helps you with your iCloud Drive issues. If you have any questions, feel free to ask them in the comments below.</p>