![]() ![]() When a file is "locked" by OS X, it is applying what *nix calls a "flag" to the file. 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 10.6 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). #FORCE EMPTY TRASH MAC 10.6 PASSWORD#Using sudo requires the administrator password but combined with rm it will absolutely forcibly remove any file regardless of whats going on with it.It is true that even as root via the Terminal you cannot use the usual UNIX "rm" command to delete locked files. This is intentionally not spelled out easily to try and prevent any novice users from accidentally deleting something significant. If that still doesn’t work you can try the ultimate delete approach using sudo and -rf *. Have backups ready or don’t bother with this method, proceed at your own risk.Ĭonfirm you are in the proper directory and the only files you see are the ones you want to forcibly remove by using ls: If you don’t know what you’re doing you could easily delete crucial system or personal files. Make sure the syntax is correct with this, the “sudo rm -rf” command will erase anything without warning. This is a last resort and intended only for advanced users. Advanced: Forcibly Emptying the Trash via Command Line Now you can try emptying the Trash as usual through the Dock, a keyboard shortcut to dump the file, or go the rm route mentioned below. Launch Terminal found in /Applications/Utilities/ and then proceed: The first approach uses the chflags command to change the flags of all files in the Trash Change Permissions To Forcibly Empty Trash Some users have also reported Command+Shift+Option+Delete to work as a method of forcing the Trash to empty regardless of a file being locked or owned by another user. If that doesn’t work, proceed with the methods outlined below. First: Try quitting all apps to release the file lock or permissions, then attempt to Secure Empty Trash by holding down the Command key and right-clicking the Trash icon. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |