![force empty trash mac locked items force empty trash mac locked items](https://caymaneco.org/yahoo_site_admin/assets/images/Heat_stressed_corals_UPI_Photo_by_D_Bhattacharya.6111419_std.jpg)
![force empty trash mac locked items force empty trash mac locked items](https://512pixels.net/wp-content/uploads/2018/08/10-2-Jaguar-Finder-Search.png)
Using other comments in this thread for reference, I managed to put together the following procedure for unlocking every file in a directory and all of its sub-directories. If anyone knows of an easier method or has written a script to go through a whole drive and unlock all the files, I would love to try it. (I don't know if there is a limit to the number of files you can open at once, but I have done a bunch.) Open the next folder and repeat. Click on the box to change them all to unlocked. If there is a mixture of locked and unlocked, a dash will be in the box. If all the files are locked the check box will be checked. If none of the files are locked the check box in the window will be empty. Now press Command I and the Get Info Window will appear. Then select ALL the individual files in the list, deselecting any folders you accidentally select. The trick to doing it fast is to sort the files in List View by Kind. I considered trying to write a script to unlock them but have selectively been unlocking them using the Get Info (CMD I). This creates a real problem when the locked files are preferences or identities and such. I recently had the bad luck of running NAV 7 and it locked about 70 per cent of the files on my hard drive. Experienced UNIX hackers will no doubt be able to use shell scripts or more complicated command combinations to unlock in batch fashion any files anywhere. If some are already unlocked, their lock attribute remains unchanged. "/Developer/Tools/SetFile a -l *" for example will unlock all files in the current directory. "/Developer/Tools/SetFile a -l " You can use wildcards. Open a Terminal window and type (without the quotes) You need to have the Developer Tools installed. Well, after puzzling over this for some time, I finally discovered that backdoor method.
#Force empty trash mac locked items mac os#
There should be some backdoor method (certainly, I agree, not one to be invoked casually) to unlock them in batch fashion (apart from rebooting into Mac OS 9.1 perhaps someday that won't be an option). Suppose that by whatever cause, malicious or otherwise, you find your disks filled with hundreds or thousands of locked files. This is disturbing (especially unsettling to one who has done Mac troubleshooting for years and is well acquainted with Murphy's Law-if something can go wrong, it will). It is true that even as root via the Terminal you cannot use the usual UNIX "rm" command to delete locked files.