Find which files are shared in iCloud Drive

I'd like to have a robust method to find this out too. The only method I know is this: (bold is the key step, very verbose here to be understood by everyone)

  1. go to the iCloud Drive folder you want to find shared files
  2. search in this folder, by say, Cmd + F
  3. make sure current directory is selected, not "This Mac"
  4. search by string shared by me (quoted "shared by me" would not work)
  5. hopefully all documents "shared by me" is shown, per document,
    1. optionally, right click and click Show in Enclosing Folder, only in the enclosing folder you will be able to see the file is marked as "shared by me"
    2. right click on the "Shared by me" file, Share > Show People
    3. select Share Options, choose Stop Sharing

This method is not robust however as you can imagine if a document has a name containing "shared by me" or so would match.

I tried checking the xattr without success. It will be great if there's a robust method be it command line or GUI.


I don't know how robust this method is, I have got some false positive (files that were previously shared), however it returns all the shared files.

mdfind -onlyin /Users/<user>/Library/Mobile\ Documents/ "kMDItemUserSharedSentTransport == 'Add People'"