Search the Site

My Social
Meta
Powered by Squarespace
« TrueCrypt Bug, or Hardware Failure | Main | Additional iPhone Thoughts »
Monday
Oct262009

Deleting Locked Files in OSX

During the migration of the data on my dad's (*cough*) Windows computer to his new iMac, we ran into lot's of locked files. Usually you get the information on a specific file (⌘ + i) and deselect the 'Locked' option in the 'General' part. It's basically impossible to remove all the locks by hand, so I needed a quicker way to remove these locks.

It seems that there's a command available in Terminal to do this. The following command removed the Locks from all the files in the current directory AND all the sub-directories.

chflags -R nouchg *

More info on the chflags command can be found in the Terminal by typing man chflags, or by visiting this page.

The cause of the locked files in my case was that we copied the data from a read-only network share (to prevent that information might get lost in copy/move actions during the migration). Reading from read-only media results in locked files (or so it seems).

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>