Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dmfresco

macrumors regular
Original poster
Sep 8, 2002
224
46
Ann Arbor
I accepted a share of a Dropbox folder with ~150K folders and files all locked. I thought it would live in the cloud but it started downloading to my HD. I stoped Dropbox syncing and dragged the folder to the trash but cannot delete it because every file and folder is locked. I can manually unlock each folder but it requires about 30 clicks. Is there a way to block delete this entire folder? I know a bit of unix and could do it in the Terminal if a solution exists. TIA.
 

MacUser2525

Suspended
Mar 17, 2007
2,097
377
Canada
I accepted a share of a Dropbox folder with ~150K folders and files all locked. I thought it would live in the cloud but it started downloading to my HD. I stoped Dropbox syncing and dragged the folder to the trash but cannot delete it because every file and folder is locked. I can manually unlock each folder but it requires about 30 clicks. Is there a way to block delete this entire folder? I know a bit of unix and could do it in the Terminal if a solution exists. TIA.

Well root should be able to delete them I would think. Open Terminal type in sudo rm -r then drag and drop the directory from the trash to terminal to get the proper path. Hit enter and type in your password which should remove the directory from the system as root user. There is a space after the -r if it does not show up in the posting.
 

dmfresco

macrumors regular
Original poster
Sep 8, 2002
224
46
Ann Arbor
Thanks. Helpful suggestion, but I am getting prompted to type Y after a bunch of embedded files and its not clear they are getting deleted. Is there a way to block delete files using the terminal?

BTW, the problem might be that the Finder believes they are shared "online" by Dropbox, but the folder is no longer shared with me on Dropbox.
 

dmfresco

macrumors regular
Original poster
Sep 8, 2002
224
46
Ann Arbor
override rw-r--r-- david/staff uchg for /Users/david/Library/Mobile Documents/com~apple~CloudDocs/.Trash/04193 pre/7705_04193-20181003/02 + 04193_pre_T1MPRAGE/s000005/04193_04193_20181003_S000005I00168.DCM? y


override rw-r--r-- david/staff uchg for /Users/david/Library/Mobile Documents/com~apple~CloudDocs/.Trash/04193 pre/7705_04193-20181003/02 + 04193_pre_T1MPRAGE/s000005/04193_04193_20181003_S000005I00123.DCM? y


override rw-r--r-- david/staff uchg for /Users/david/Library/Mobile Documents/com~apple~CloudDocs/.Trash/04193 pre/7705_04193-20181003/02 + 04193_pre_T1MPRAGE/s000005/04193_04193_20181003_S000005I00111.DCM? y


override rw-r--r-- david/staff uchg for /Users/david/Library/Mobile Documents/com~apple~CloudDocs/.Trash/04193 pre/7705_04193-20181003/02 + 04193_pre_T1MPRAGE/s000005/04193_04193_20181003_S000005I00114.DCM? y


override rw-r--r-- david/staff uchg for /Users/david/Library/Mobile Documents/com~apple~CloudDocs/.Trash/04193 pre/7705_04193-20181003/02 + 04193_pre_T1MPRAGE/s000005/04193_04193_20181003_S000005I00100.DCM? y


override rw-r--r-- david/staff uchg for /Users/david/Library/Mobile Documents/com~apple~CloudDocs/.Trash/04193 pre/7705_04193-20181003/02 + 04193_pre_T1MPRAGE/s000005/04193_04193_20181003_S000005I00170.DCM? y


david@Davids-New-MacBook-Pro ~ % y

Some of the Terminal lines after issuing sudo rm -r
 

dmfresco

macrumors regular
Original poster
Sep 8, 2002
224
46
Ann Arbor
Thanks for the suggestion. I eventually figured it out using this command:

sudo rm -rf /path/to/my/files
 

Nermal

Moderator
Staff member
Dec 7, 2002
21,007
4,588
New Zealand
Use -rf instead of -r and, if I recall correctly, it won't prompt you. Be sure to double-check the path before you press Enter!

Edit: You're too quick :)
 

dmfresco

macrumors regular
Original poster
Sep 8, 2002
224
46
Ann Arbor
Use -rf instead of -r and, if I recall correctly, it won't prompt you. Be sure to double-check the path before you press Enter!

Edit: You're too quick :)
This was the answer! Thanks to both of you for leading me in the right direction.
 

MacUser2525

Suspended
Mar 17, 2007
2,097
377
Canada
Use -rf instead of -r and, if I recall correctly, it won't prompt you. Be sure to double-check the path before you press Enter!

Edit: You're too quick :)

You are correct the f is for force which eliminates the asking of the question if it is needed. The r in it removes every directory and the files contained beneath the one in the command line, for those who do not know that. And yes definitely check the proper path is there or you can run into big trouble with that command.
 
  • Like
Reactions: dmfresco

Daverich4

macrumors regular
Jan 13, 2020
112
27
You couldn’t just Get Info on the folder and change the Permissions on the folder and the files within it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.