Find locked files in OSX terminal
Locked files in OSX can't be removed with the traditional rm. The Finder does offer a "Lock" checkbox, however this is very inconvenient to use on a large number of files.
In the Terminal it's possible to identify the locked files with the following command:
find . -type f -flags +uchg
The uchg
flag comes from chflags and represents the "user immutable" flag, which corresponds to the SetFlags -a (l|L)
option.
Written by Jinn Koriech
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#