Can't unlock folder in 10.2.1
Odd problem. Can't unlock a folder in 10.2.1 to trash it, or move it. I have run the fix permissions utility. I used batChmod to change the permissions of the folder to 777, but the lock box is still greyed out, but checked in the get info box. What gives?
Also, in the terminal how do you cd to directories with weird names, such as "abc 02-101 Name & Title Docs"
Thanks. I need to prune my disk, and this folder is driving me nuts!
Also, in the terminal how do you cd to directories with weird names, such as "abc 02-101 Name & Title Docs"
Thanks. I need to prune my disk, and this folder is driving me nuts!
Comments
cd "abc 02-101 Name & Title Docs"
or
cd abc\\ 02-101\\ Name\\ \\&\\ Title\\ Docs/
You could also just type "cd " (note the trailing space, but don't use the quotes) in the Terminal and then just drag and drop the folder from the Finder into the Terminal window. That will fill in the name. Just press return after that.
As for the locked folder problem, I'm not sure what could cause that. Rather than use batchmod, have you tried just using the round lock button in the Finder info window for it? Click the disclosure triangle for Ownership & Permissions and you'll see it. From there, try changing the owner to your user (Me) and see if you can then unlock it.
Worst case, you could use "sudo rm -Rf /path/to/folder/name" in the terminal to delete it. Be extra careful with this command, though, because it will permanently delete whatever is at the path you give it.
[ 09-25-2002: Message edited by: Brad ]</p>
[QB]
Also, in the terminal how do you cd to directories with weird names, such as "abc 02-101 Name & Title Docs"
QB]<hr></blockquote>
exactly as you wrote it. with "" .
When I use the sudo rm -Rf /path/to/folder, it lists all of the files within the folder with : Operation not permitted after it.
Yes, I am using an admin account, and yes I have tried removing each individual file in this manner, with no success. Any other ideas, from the friendly Unix fiends out there?
I once somehow accidentally locked a file in a way that *nothing* could delete it. I can't remember exactly which flag it was, but it was set so the only way it could be deleted was through the single-user mode prompt.
update: okay, it's called the system immutable flag. When this is set, absolutely nothing can remove the file under normal circumstances, even the admin or "root" user. I can't recall how to get info on the file to see what flags are set for it, though.
Anyhow, to get rid of such a flagged file or folder, you have to reboot into single-user mode. To do this, restart your Mac while holding the apple and 's' keys. When you're dumped into a text console, you can release the keys.
Before you can do anything to your drive at this prompt, you first have to check it and mount it. To do this, enter the command:
/sbin/fsck -y
It will check scan your disk for errors. If you get a message that reads "**** FILEYSYSTEM WAS MODIFIED ****" then you should run it again just to be safe. When it says the disk is okay, enter the command:
/sbin/mount -uw /
That will mount the drive and start you at the top. From here, you can "cd" into all your directories until you find what you need to delete. Be careful that you don't modify or delete anything else, because you're essentially logged in as the all-powerful "root" user (or super-user) here. Anyhow, one you find the folder, use that command we gave you above:
rm -Rf "name of folder"
You don't need the "sudo" part because sudo just authenticates you as a super-user. That's redundant here single-user mode already puts you as the super-user.
When finished, you can continue booting up normally by entering the command:
exit
Did you follow all that?
Best of luck!
[ 09-26-2002: Message edited by: Brad ]</p>