Detect long paths incompatible with OneDrive for Mac


Screen Shot 2015-09-01 at 21.35.28

As a user of OneDrive on MacOS I ran into an issue that OneDrive would hang at the processing files or scanning files stage. After some searching I found that this can be related to having paths with more than 255 characters in the name but how to find those? Well some small bash magic did the trick for me.

cd ~/OneDrive && find `pwd` -name '*' | grep '^.{255}'

This will list all the paths longer than 255 characters for the OneDrive directory located in home.

4 thoughts on “Detect long paths incompatible with OneDrive for Mac

  1. Right idea, but if your OneDrive directory is not in your home directory, you will need to correct this as the ~/OneDrive and the `pwd` won’t work. Instead try:
    CD your-OneDrive-directory
    find . -name ‘*’ | grep ‘^.{255}’

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s