|
|
Locked files and Mac OS X
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. When a file is "locked" by OS X, it is applying what *nix calls a "flag" to the file. In this case, the flag is "uchg", which means that no user, even root, can alter the file in any way until the flag is removed. You can use the command chflags to remove the flag.
The following example should unlock every file in your home directory:
Here's a breakdown of the command:sudo will run the chflags command as root (you may be prompted for your root password). -R will cause the command to affect every file in the directory and all of its subdirectories. Yes, capitalization matters. nouchg is the syntax for removing the uchg flag. Any flag can be removed by putting "no" in front of it. You can of course substitute the tilde (~) with whatever directory path you want to affect. To change an individual file, leave out the -R and type the file path instead of a directory path. Normal operators apply, such as $ and *.
For the Trash...
To apply my above hint to items already in the trash, use:
To empty the trash entirely, add a simple
I'll bet someone who knew their applescript could write up a simple "Force Empty Trash" menu item based on those two commands.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|