Accessing BOX on macOS with command line

MacOS and BOX Logos


UW personnel has access to Box, a cloud drive to store documents. While the older “Box Sync” application kept a copy of every file and folder on the local computer, the newer “box drive” software keeps only chosen folders or files on the local machine, everything else stays in the “cloud.”

The location of the “box” directory containing files and folders has changed after macOS 11.5.

Up to macOS 11.5 the “box” directory was located within the user directory. For command line access that simply meant using:   cd ~/box to get there.

With the newer macOS, in particular for those with the new M1 or M2 chips, the “box” directory has changed to ~/Library/CloudStorage/Box-Box

Why is this useful?

I received sequence files that I placed in “box.” I then realized that they were plain text and uncompressed. In order to apply a gzipcompression I had to find them from a Terminal and was surprised that the “box” directory was no longer in ~/box where I expected. After finding the new location I could then use:

cd ~/Library/CloudStorage/Box-Box

gzip *.text

This saved about 60 Mb of storage. But for larger files it could be a lot more.

All the technical details explaining this change as well as  on how to use “box” can be found on the Box support article: Using-Box-Drive-Basics.