Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

deleting locked files

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 05-25-2005
Aussie John Aussie John is offline
Registered User
Join Date: May 2005
Last Activity: 25 May 2005, 3:56 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
deleting locked files

I have some locked files ( locked via the Mac finder)
I have tired rm -R and rm -rdf but it doesnt delete the locked files

just says "override rw------- etc?"
type "yes" and says "operation not permitted"

is there some way to do this (or unlock the files)
Sponsored Links
Old Unix and Linux 05-25-2005
babayeve babayeve is offline
Registered User
Join Date: Aug 2002
Last Activity: 16 July 2005, 4:34 AM EDT
Location: azerbaijan
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
sorry i don't understand file is locked. and i don't know what mac finder is. i gess it is something finding your mac address of ethernet? BUT,

1) if it is locked as in RCS (revision control system) or SCCS (source code control system) , you (hopefully owner) can unlock it " rcs -u YourFileName " see man rcs if it is installed in your system. see man sccs to learn how to unlock with sccs. unfortunately i don't know.

2) if your file is in use, you can see it with " fuser -m TheFileName or the directoryName holding it " fuser is file user. see man fuser to see how to kill the process using your file. i think it is fuser -km FileName. better investigate it yourself. If you know which process is using your file you can terminate the process with " kill " command.

3) use " lsattr YourFileName " to see the attributes of your file. it might be set as immutable or undeletable with command "chattr -i filename" or " chattr -u filename " if so you can do the opposite with " chattr +i +u filename " see man chattr or man lsattr for more detail. chattr and lsattr come with newer systems. my fedora2 has it. older systems don't

these were all i know. hope they are usefull.

emil babayev
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find all locked files mrn6430 AIX 4 09-16-2011 12:40 PM
AIX system.... deleting files in remote directory after retrieving files vinayparakala Shell Programming and Scripting 3 03-05-2011 04:41 AM
I have files that are locked up... SentinelX UNIX for Dummies Questions & Answers 2 09-02-2010 06:10 PM
Need help comparing two files and deleting some things in those files! linuxkid Shell Programming and Scripting 24 07-28-2010 05:32 AM
find locked files, print file path, unlock file alternapop UNIX for Dummies Questions & Answers 0 04-14-2009 08:09 PM

All times are GMT -4. The time now is 01:37 AM.