Interesting problem, finder freezes on one user

natept

Registered
iMac G5 running Tiger

Well in my infinite boredom I drunkinly tried to make an image sequence out of the movie Braveheart using Quicktime Pro. I don't even know why I guess I just wanted to see what would happen. I set the computer to its task and went to bed, in the morning the computer was non responsive so I restarted manually.

The computer powered up fine, but everything was missing from the desktop (and still is). Finder wouldn't open, but some programs will right away after you've restarted, but eventually it freezes up again. I try to relaunch finder, freezes again.

Using the startup disk and disk utility I was able to find that there are supposedly upwards of 65000 images on the desktop from Braveheart. I used the First Aid utility but it made no difference. Im pretty sure the computer is stuck trying to load all the images, but leaving it running for 24+ hours does nothing, it eventually goes into sleep mode like its not doing anything.

I am able to login just fine on other users, but I cant access my files as there is no permission or whatever. I'm fine with reinstalling my OS, but I really need to get at some files on my login.

Does anyone have any ideas for either fixing the problem or getting to my files? I've looked through dozens of threads but was unable to find a solution.
TIA
-Nate
 

simbalala

Registered
Can you even open Terminal in that Account?

Can you achieve admin rights in one of the other accounts or by booting from the startup disk?
 

natept

Registered
I can get to terminal, though I've never used terminal before. I have admin rights on the other account, but it still won't let me access the files from my account.
 

simbalala

Registered
I have admin rights on the other account, but it still won’t let me access the files from my account.
Sure it will.

Since you’re not too familiar with Terminal be very, very careful with what follows.

If you open terminal and type sudo -s you become the root user till you exit the session. You can access any file on the drive including those in the messed up user account.

So here goes…

Type “sudo -s” (no quote marks, just the command, the same applies for all following commands I’m giving you)

type “ls” - that’s a directory listing

type “cd /” - takes you to the top directory level

type “cd users” - now you’re in the top users directory

You’ll see directories for the various users on the machine.

type “cd yourproblemuser/Desktop” (where yourproblemuser = the messed up account)

type “ls” - if what you initially said is correct you’ll see about 65,000 names flash by

---------------------------------------

Try to find something all those problem file names have in common, same extension, same first letters, anything they all share.

type “exit” - you’ll be back in your original user account and then quit terminal

That’s all I’m going to give you for now. I want to know what those files have in common and I want you to tell me. Give me an example file name.

I’ll wait.
 
Last edited:

natept

Registered
I get as far as "cd users" and it says "-bash: cd: users: No such file or directory"

There is also no change when I type in "sudo -s"

I have never used Terminal until today so I am completely unfamiliar with it. Am I pressing enter after each command you gave me? Should I be in new command for all of those or in the same box after typing "sudo -s"?

Thanks a lot for your help so far, its greatly appreciated, I'm pulling my hair out here!
 

natept

Registered
Im also in terminal after loading from the CD (using the startup disk), should I access terminal from somewhere else?
 

simbalala

Registered
No, don’t boot from the cd/dvd.

Boot from a good user account on the hard disk which has admin privileges.

(Yes, you hit return after every command I’ve given you)
 

natept

Registered
Ok, here is an example filename:

BRAVHART 21844.jpg

This fills the entire terminal screen from number 13823 to 65536. Its safe to assume it starts at 00001.
 

simbalala

Registered
Ok, that’s pretty simple.

Repeat all the commands all the way through…

type “cd yourproblemuser/Desktop”

type “ls” again to make sure you're in the right directory with all those BRAVHART files showing again.

type “mkdir junk” - you're creating a new folder named junk on the Desktop and we're going to move all those .jpg files into it with one command

type “mv *.jpg ./junk” - we’ve just moved 65,000 files into the new folder (plus any other .jpg files you may have had on the desktop)

You should be able to log out and log back into your regular account now. Let me know when you have.
 

simbalala

Registered
Well, no response yet so I’ll tell you what I’d do now.

In your regular account (the one that was messed up) and assuming you want to delete all those BRAVHART images, start Terminal again (you don’t need sudo any longer, you’re in your main account).

type “cd Desktop/junk”

type “rm BRAVHART*.jpg” - poof, they’re gone

Any .jpg files that were moved into junk that did not have BRAVHART in the name will still be in your Desktop/junk folder.

I made this take longer than I would have if I were doing it myself because I didn’t want you to goof up using sudo, you can do a lot of damage.

You could just move the junk folder to the trash and empty the trash but that would probably take a lot longer than rm in Terminal.
 

natept

Registered
Ok did all of that and got the following:

"bash: /bin/mv: Argument list too long"

I have no problem deleting the files if that is possible.
 

simbalala

Registered
Ok did all of that and got the following:

"bash: /bin/mv: Argument list too long"

I have no problem deleting the files if that is possible.
You mean you’re not worried about any stray .jpg files that might have been moved into junk along with the BRAVHART ones?

If that’s the case and you’re still in Desktop/junk

type “cd ..”

type “ls -al” and make sure you see the junk directory.

type “rm -r junk” - you’ll remove the junk folder, just faster than you would have by using Finder and emptying the trash


===========================================

Oh, wait, I’m too far ahead of you.

The mv command failed while you were still in the secondary account account using “sudo -s”?

Maybe it’s because there are so many files.

OK then,

in the secondary account, using “sudo -s”, like before, while you’re in the yourproblemuser/Desktop directory...

type “rm BRAVHART*.jpg” and see if that works.
 
Last edited:

natept

Registered
I'm pretty sure they never actually moved to the junk folder as it said list too long.

I switched to the main account, same things as before happened and no "junk" folder was there (just like Macintosh HD isn't there as it used to be).
 

natept

Registered
Saw your edited post, got the same "list too long" response. I wonder if I did the same command but after the *added 0, than 1, than 2, than 3, than 4, than 5, than 6 would do it.
 

natept

Registered
Simbalala, you sir, are a genius.

I had to do "rm BRAVHART*1*.jpg" for 1-6. The images starting with 0 wouldn't delete, but at that point doing "rm BRAVHART*.jpg" worked. I'm on my main account, nothing seems to be missing, everything seems to be working, life is good. I am eternally grateful.

Thanks for all your help.
-Nate
 

simbalala

Registered
Yeah, with 65,000+ files in the argument the system choked.

You did what I would have suggested next and removed them in chunks the system could manage.

And you figured that out all by yourself.

BTW: You can always type “man rm”, or “man ls”, etc. in Terminal to read about the commands I’ve given you.
 
Top