Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / October 2004



Tip: Looking for answers? Try searching our database.

unlocking a file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jtownsen - 15 Oct 2004 00:02 GMT
I have a hierarchy of folders that I'd like to delete. Normally I'd use "rm
-r". However, there folders contain at least one file that is locked. I'm
familiar with using chmod to change permissions. However a locked file on a
Mac, as I understand it, is a not a permission thing, but a Mac OS thing.

I've heard that their is an Apple-provided tool to unlock files (e.g. in
terminal). Anyone know what the tool is called? Or any other approach?

Thanks
Ken Williams - 15 Oct 2004 01:30 GMT
On Oct 14, 2004, at 6:02 PM, jtownsen wrote:

> I have a hierarchy of folders that I'd like to delete. Normally I'd
> use "rm -r". However, there folders contain at least one file that is
[quoted text clipped - 5 lines]
> in terminal). Anyone know what the tool is called? Or any other
> approach?

It's /Developer/Tools/SetFile.  There's a man page at `man SetFile`.

 -Ken
Sherm Pendley - 15 Oct 2004 01:48 GMT
On Oct 14, 2004, at 7:02 PM, jtownsen wrote:

> I've heard that their is an Apple-provided tool to unlock files (e.g.
> in terminal). Anyone know what the tool is called?

SetFile. Uppercase attributes enable certain options, and lowercase
disables them. Locking is, predictably enough, "L/l". For example, to
unlock foo.txt:

SetFile -al foo.txt

For details, see "man SetFile".

>  Or any other approach?

It looks like there's a FSpRstFLock() function in Mac::Files - part of
the Mac::Carbon distribution on CPAN - but I haven't used that.

sherm--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.