Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Using Terminal to delete .plist

Using Terminal to delete .plist
Thread Tools
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Sep 18, 2003, 06:01 AM
 
On of my Macs running 10.2.6 seems to have a corrupt com.apple.finder.plist file (I assume). There are various ways I could go about deleting this, but I thought I could boot into UNIX (using command-S at startup) and delete the file that way.

It seems, though, that I cannot login as an administrator this way if I try 'login' at the command line. Is this because I have entered 'single-user' mode? Can I boot into UNIX but not in single-user mode? I don't think I have read how to do this anywhere.

I guess there are other ways around my problem, but I would like to know a bit more about booting directly into UNIX and doing something other than fsck.

Cheers,

Phil
     
Forum Regular
Join Date: Jan 2000
Location: Germany
Status: Offline
Reply With Quote
Sep 18, 2003, 06:17 AM
 
I think you have to mount the disk first using the command that says when booted in single user mode.

//Rob
     
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Sep 18, 2003, 06:23 AM
 
Originally posted by Robo-X:
I think you have to mount the disk first using the command that says when booted in single user mode.

//Rob
Yes I don't think it is mounted by default in single user mode. Why not just boot normally and delete it: sudo rm file? Then logout and back in again.
     
philm  (op)
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Sep 18, 2003, 08:40 AM
 
Originally posted by WJMoore:
Why not just boot normally and delete it: sudo rm file? Then logout and back in again.
Do you mean - boot normally and then launch Terminal? I can't do that because the Finder app seems corrupted and I cannot launch any applications (including Terminal).
     
Senior User
Join Date: Jun 2002
Location: UK
Status: Offline
Reply With Quote
Sep 18, 2003, 08:46 AM
 
Originally posted by philm:
On of my Macs running 10.2.6 seems to have a corrupt com.apple.finder.plist file (I assume). There are various ways I could go about deleting this, but I thought I could boot into UNIX (using command-S at startup) and delete the file that way.

It seems, though, that I cannot login as an administrator this way if I try 'login' at the command line. Is this because I have entered 'single-user' mode? Can I boot into UNIX but not in single-user mode? I don't think I have read how to do this anywhere.

I guess there are other ways around my problem, but I would like to know a bit more about booting directly into UNIX and doing something other than fsck.

Cheers,

Phil
Can you login as >console ???
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Sep 18, 2003, 09:41 AM
 
boot the machine as you've tried, mount the drive like it says, nav to the file, so you can see the right one, then trash it? have you tried that?

or

login from another machine, via ssh, and kill it that way
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Senior User
Join Date: Jun 2002
Location: UK
Status: Offline
Reply With Quote
Sep 18, 2003, 10:23 AM
 
Originally posted by philzilla:
boot the machine as you've tried, mount the drive like it says, nav to the file, so you can see the right one, then trash it? have you tried that?

or

login from another machine, via ssh, and kill it that way
How is he supposed to "navigate" there? He said Finder doesn't work, didn't he?
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Sep 18, 2003, 11:10 AM
 
Boot normally.

Then, on the login screen, login as >console. To do that, go to the login screen.

1) Press the down arrow to select one user in the list.

2) Hold the option key, and press return.

The login panel magically transforms from the "List of Users" to the "Name/Password" dialog.

Log in there as ">console". You will get a console login prompt. You can login with your short username and password.

Then do "cd Library/Preferences && rm com.apple.finder.plist"

Voila. Type "logout" or "exit" or hit control-D and you'll go back the the GUI login screen.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Sep 18, 2003, 11:41 AM
 
Boot using cmd-s to enter single-user mode
Code:
fsck -y (repeat until it reports no errors) mount -uw / rm /Users/<your short user name>/Library/Preferences/com.apple.finder.plist exit
If 'rm' doesn't work, try 'rm -f' or 'sudo rm -f'.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Sep 18, 2003, 12:01 PM
 
Originally posted by VEGAN:
How is he supposed to "navigate" there? He said Finder doesn't work, didn't he?
single user mode? command line? hello?

basically, i meant what smeger has just posted. he said he'd booted into SU mode, and i didn't mention using Finder
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Mac Elite
Join Date: Jan 2002
Location: California
Status: Offline
Reply With Quote
Sep 18, 2003, 12:04 PM
 
Why not just Command-f in the finder, find the file, and Trash it?
MacBook Pro
Mac Mini
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 18, 2003, 12:33 PM
 
What the hell? So much confusion in this thread, about something relatively simple?

Steps to delete the file using Single User Mode (actually, let's rename the file in case the pref file isn't really the problem):

1. Boot with Command and S down until you get to the prompt.

2. fsck

3. mount -uw /

4. cd /Users/<admin's username>/Library/Preferences

5. mv com.apple.finder.plist com.apple.finder.plist.bak

6. reboot

voila.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status: Offline
Reply With Quote
Sep 18, 2003, 01:09 PM
 
Originally posted by smeger:
Boot using cmd-s to enter single-user mode
Code:
fsck -y (repeat until it reports no errors) mount -uw / rm /Users/<your short user name>/Library/Preferences/com.apple.finder.plist exit
If 'rm' doesn't work, try 'rm -f' or 'sudo rm -f'.
Oh dear God, please do NOT do this. If you screw up that command (more specifically the alternatives) you'll wipe your entire computer including any drives you have mounted.

You must cd /Users/<user name>/Library/Preferences and hit return before executing the "rm" command.
ClamXav - the free virus scanner for Mac OS X | Geobunny learns to fly
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Sep 18, 2003, 01:12 PM
 
arkham_c, that's a cool trick for the login panel. thanks!

Geobunny, thanks for the catch. You shouldn't need to use rm -r or sudo rm -f from within single-user mode, but you're absolutely correct, those commands are very dangerous and you should 'cd' to the proper directory before using 'em to minimize the damage that a typo could cause.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 18, 2003, 01:56 PM
 
Originally posted by smeger:
arkham_c, that's a cool trick for the login panel. thanks!

Geobunny, thanks for the catch. You shouldn't need to use rm -r or sudo rm -f from within single-user mode, but you're absolutely correct, those commands are very dangerous and you should 'cd' to the proper directory before using 'em to minimize the damage that a typo could cause.
In this case, rm is not necessary at all. Just use mv to rename the file. If it doesn't have its standard name, the Finder won't see it as its preference file, and will create a new one. Same effect as deleting the pref file, except that if the prefs file isn't the problem, you can put the original file and not have to redo your settings.

Seriously, the instructions I posted above tell exactly what you need to do.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Sep 18, 2003, 08:16 PM
 
Originally posted by Macpilot:
Why not just Command-f in the finder, find the file, and Trash it?
coz the Finder ain't workin'!
     
philm  (op)
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Sep 19, 2003, 03:32 AM
 
Thanks for everyone's help with this. I mounted the drive as suggested (I had not noticed that you are told how to do this when you boot up in single-user mode!) and deleted the .plist file.

Cheers to all! Phil
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:32 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2