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
du
- for some reason,du
is able to go into folders thatfind
orls
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