OS X woes
Hi,
I run OS X 10.1.5. Last night, while emptying trash, I got this error - "This operation could not be completed because one or more required items could not be found. Error code -35".
I decided to look in ~/.Trash. `ls` returned a bunch of files with lots of '?' in them. For e.g., herbertgr??????eyer - alkohol.txt. But, `vi *`, `ls -al` and `rm -rf *` returned 'no match'! I was stumped. Why did `ls` show me all those files while the other commads returned 'no match'?
I Googled and found a link (stupid me, didn't bookmark it, and now I can't find it) that basically said that the solution was to boot into OS 9 and delete the files. How do I do this? I did see System Preferences->Startup Disk, where I could specify the startup disk for next reboot. I'm wary of trying it out because I am not sure if I can reset it back to the OS X disk, in the OS 9 System Preferences (is there one? I've never used OS 9). Or, can I boot into OS 9 from OS X without actually changing the startup disk? How would I then access the Finder equivalent in OS 9?
Any nudge in the right direction would be appreciated. It'll also be great if someone could explain why `ls` and `ls -al` are behaving differently.
Thanks!
~Yogi.
Posted by: 303
Re: OS X woes - 07/03/2003 05:10
try
this guy, it works for me.
Installed "Trash It!". When I launch it, I get a pop up "Trash currently contains no items", and the app quits. The problem files are still in ~/.Trash, and the Trash Can on the dock still shows that it has files in it.
Posted by: peter
Re: OS X woes - 07/03/2003 06:05
`ls` returned a bunch of files with lots of '?' in them. For e.g., herbertgr??????eyer - alkohol.txt. But, `vi *`, `ls -al` and `rm -rf *` returned 'no match'! I was stumped. Why did `ls` show me all those files while the other commads returned 'no match'?
Because you have files referenced in the directory (returned to ls by readdir()) whose inodes aren't valid (not returned to ls -al by stat()).
Whatever the OS X equivalent of fsck is, run it now. Your filesystem is corrupt.
Peter
Posted by: wfaulk
Re: OS X woes - 07/03/2003 07:45
You can set it back to OS X from within OS 9. Go for it.
Alternately, you might want to try booting into single-user mode and running fsck on that filesystem. Reboot the computer, and when you hear the initial chime, hold down command-s until you see something happening.
You'll be given a command-line interface, and, IIRC, you'll get automatically logged in as root. Run ``/sbin/fsck -y''. After it's done, run ``/sbin/shutdown -r now''.
ya its pretty much the sameway in os 9, i woulnt worrie too much. you will hit the apple logo then go to control panel then startup disk in os9. then pick your os x disk and your back to the way you were before.
Thanks guys for the replies. I booted into OS 9 and saw that it showed trash was empty! So there was nothing to delete. I booted back into OS X and saw that the corrupt files were still in ~/.Trash (and trash can icon showed that it was not empty).
Guess as you guys suggested next option is to do a fsck and see if that helps. Will report status.
Thanks,
~Yogi.
Did what Bitt suggested. Apparently something was corrupted and fsck repaired it. But after rebooting, I still see that trash is not empty (and problems with ls, ls -al etc on that directory persist)
Posted by: wfaulk
Re: OS X woes - 07/03/2003 14:48
Run fsck until no more errors are reported.
Ran fsck (twice) till I got the message 'Macintosh HD volume is OK'. But the problems persist.
Also booted into OS 9 (after fsck), deleted some files and emptied trash, hoping that this would clean up the problem files. But when I booted back into OS X, trash was not empty.
Posted by: trs24
Re: OS X woes - 07/03/2003 23:40
A few questions:
Have you read this
kb article?
If so, have you tried the following in Terminal.app?
sudo rm -rf ~/.Trash/*
(In order to become root in pre jaguar os x, you might have to hack the root password in NetInfo as explained
here.)
what mac do you have? and do you have a version of an osx restore/disk utility disk or dvd?
- trs
rm -rf (as user and root) was the first thing I tried even before I did an ls!
Thanks for the link. I run 10.1.5 on a PowerBook. I do have the OS X disk, but going through one of the documents from the link you gave, it seems like fsck does whatever the disk utility would do. But I will run it as soon as I get home and see if that helps.
Posted by: trs24
Re: OS X woes - 08/03/2003 19:28
Well, depending on what version of an OS X restore cd/dvd you might have, I was going to suggest as a last resort the Archive and Re-Install feature. This usually ends up being the end-all cure-all from apple support. The nice thing is that it saves all of your preferences and settings before re-installing the system.
I hope you get it resolved!
Also, have you tried re-naming the files before trying to remove them?
- trs
Posted by: mcomb
Re: OS X woes - 10/03/2003 22:54
rm -rf (as user and root) was the first thing I tried even before I did an ls!
Just delete the whole trash directory, it will get recreated the next time you throw something away...
rm -rf .Trash
-Mike
Welcome to Darwin!
[kurt:~] yogi% rm -rf .Trash
rm: .Trash/yw1: Directory not empty
rm: .Trash: Directory not empty
[kurt:~] yogi%
yw1 is the directory that has files with file names *??*.
I was planning to upgrade to Jaguar for a long time now, may be will do it soon and hope that this thing gets fixed!
~Yogi.
Posted by: peter
Re: OS X woes - 11/03/2003 03:40
Welcome to Darwin!
If fsck doesn't fix this, then it's a bug in fsck. Report it to Apple.
Peter
Posted by: wfaulk
Re: OS X woes - 11/03/2003 07:28
Yeah. And if you figure out how to report a bug to Apple, let me know.
Posted by: drakino
Re: OS X woes - 11/03/2003 08:28
Use
this form for Mac OS X bug reports/feedback.
Posted by: wfaulk
Re: OS X woes - 11/03/2003 08:32
Thank you! I searched for that for hours one night.
Thanks for the link. Have given feedback. Let's see what happens.
Posted by: mcomb
Re: OS X woes - 11/03/2003 12:58
rm: .Trash/yw1: Directory not empty
Truly odd. Only other thing I can think of to try would be...
> open .Trash
which should cause the hidden folder to open in a finder window. Then see if you can rename the yw1 directory from the finder and then empty trash.
-Mike
Clicking on the trash icon also opens a finder window? Anyway, I did what you said, now it says .Trash/junk is not empty -:)
I searched Google again and found the weblog of one guy who'd faced the same problem -
http://www.edgecurve.com/imac/log.php. Look at "Entry #6 - February 18th, 2002" for problem and "Entry #11 - February 28th, 2002" for solution.
When I booted into OS 9, the trash in OS 9 was empty, which probably makes sense since OS 9 might not be storing deleted files in ~/.Trash. But the funny thing was that I couldn't find ~/.Trash in the Finder equivalent of OS 9 (I did see other hidden files though). So I'm wondering where this guy deleted the files from. I've emailed him also, but he hasn't responded..
~Yogi
Posted by: mcomb
Re: OS X woes - 12/03/2003 00:50
Clicking on the trash icon also opens a finder window
Er, um, yeah, I knew that (brain fart) ;-)
I couldn't find ~/.Trash in the Finder equivalent of OS 9
There is a hidden attribute that is probably set for that folder. There are a variety of different ways to change that under OS 9, but as I haven't really used OS 9 in about 3 years I don't recall the easiest one or the exact steps. You can use a variety of tools including ResEdit, FileBuddy, and the find command to locate and throw away a hidden folder. Perhaps somebody else (or Google) can list the steps.
But, all that aside I agree with whoever said earlier that this sounds like a file system error that fsck should catch. I wonder if it is fixed in 10.2?
-Mike
Fixed!
Moved 'junk' from Trash to ~/Work, booted into OS 9, deleted ~/Work/junk, emptied trash (which gave a message that 37 files which took up 0 KB disk space were deleted), booted into OS X (fsck'ing just to make sure).
Thanks guys..
~Yogi