1

I've just synched a large (~50gb?) google drive to my local OSX 10.14.5 (Mojave), using Google Drive File Stream v.32.

I am attempting to get a list of all of the files that were synced with

find /Volumes/GoogleDrive/My Drive/folder

However, this errors out for many sub-directories, with messages like the following:

./xyz
find: ./xyz: No such file or directory

the same errors obtain if I try ls -1R.

Interestingly, if I cd into the directories that cause issues, and then try find or ls, it seems to work.

Any idea what is going on here? What magic is google drive file stream using such that directories can't be recursed with find or ls, but you can cd into them and then use those commands?

Note that browsing the directories in question with mac's Finder seems to work fine - the directories are all there. It seems to be the command line tools that are having trouble coping for some reason...

Possibly related: https://stackoverflow.com/questions/50802125/google-drive-file-stream-on-os-x-fails-to-ls-files

1
  • I was able to work around this somewhat by using du - for some reason, du is able to go into folders that find or ls complain about. At the same time, du doesn't find all files (seems to miss a few top level files at times). So to get the best list, you can combine the results from the two. du -a | cut -f 2 | sort -f > ~/du-out.txt; find . | sort -f > ~/find-out.txt; cat ~/du-out.txt ~/find-out.txt | sort -u -f > ~/combined.txt
    – karlos
    Commented Mar 8, 2021 at 17:10

2 Answers 2

0

I tried a different approach, to delete the Google Drive Desktop /Google File Stream cache, as described here: https://remarkablemark.medium.com/how-to-clear-google-drive-cache-abf9efc6089e

After doing this, the ls and find` commands seemed to work. So maybe the cache was somehow corrupted. Worth a shot if you ever run into this.

0

A completely different approach might be use the GoogleDrive API. See e.g. https://developers.google.com/drive/api/guides/search-files

2
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented May 8, 2022 at 5:20
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Commented May 8, 2022 at 6:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .