#CLICOLOR

Dr. Juande Santander-Velajuandesant@astrodon.social
2025-06-06

Combined Public Service Announcement and Today I Learned: if you have `CLICOLOR=1` on macOS, if you do an `ls` of a directory which is inside iCloud Drive, evicted files (i.e., those that cannot be immediately used, but need to be downloaded first from iCloud) show with a grey background… see below:
First, both files are in iCloud, but not locally available. They have a dotted cloud icons in the iCloud Status field of the Finder window, and a greyed background in the output of the `ls` command.
Second, the `cssday.pdf` file shows a filled circle with a down arrow as part of their iCloud Status, which represents the "Keep Downloaded" option (i.e., the file has been downloaded and is locally available), while the other file keeps the dotted cloud icon. In that case only the `Screenshot…` file is shown as grayed out in the output of `ls`.

#PSA #PublicServiceAnnouncement #TIL #TodayILearned #iCloudDrive #Terminal #CLICOLOR

A Finder window showing a Folder named "CLICOLOR_Test" with two files: a PDF called "cssday.pdf", and a PNG file with a name that starts with "Screenshot-2025-" and ends with "17.08.34.png". The iCloud Status icon shows a cloud with a down arrow, indicando that it is not currently downloaded.Screenshot of Terminal.app showing the command `ls -ln` run on the CLICOLOR_Test folder, and showing both files with a gray background in their filename.Another screenshot of the CLICOLOR_Test folder, now with cssday.pdf showing a down-arrow circle (representing that the file will be kept downloaded), which means it is undoubtedly locally available.Screenshot of Terminal.app showing the command `ls -ln` run on the CLICOLOR_Test folder, but this time the `cssday.pdf` file shows a white background, while the screenshot file still sports a gray background behind their filename.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst