Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Killyp

macrumors 68040
Original poster
Jun 14, 2006
3,859
7
Hi there

I recently tried to install the syncing software for a PalmOS device (PalmDesktop?) and I didn't like it. Upon dragging the folder to the trash, and emptying it, it gave me an error:

The operation cannot be completed because the item "Localized.rsrc" is in use.

the two buttons are STOP and CONTINUE

I have tried a file shredder, and repairing disk permissions, and NONE of them work. What should I do?!?!? The rubbish Palm software is driving me nuts!
 
I've tried the above and it doesn't seem to do anything...

It just goes to a new line. This stupid file is really irritating me now! Is there any way I can find out what the process is that's using it and Force Quit it just while I try and delete the file?
 
Killyp said:
I've tried the above and it doesn't seem to do anything...

It just goes to a new line.

Then it should be done. If not you haven't got the path correct
 
If you type

lsof | grep <filename>

into the terminal, it will tell you what's using the file. Note, not the pathname, just the filename and it's case sensitive.

Normally, secure delete works for me when the Finder reports a file in use.

Incidentally, if you get a device in use, you can type df to get a list of drive names (e.g. /dev/disk0s3) and then do lsof /dev/disk0s3 and it will tell you why you can't eject the device.

Of course, if that fails, you can type hdiutil eject -force /dev/disk0s3.
 
I've put the files in the following directory:

the hard disk is "HD1"

the folder is "palmdesktop" (straight inside the root of the hard disk)
and the file is "Localized.rsrc"

what would be the exact thing that I type into Terminal??

I'm used to DOS syntax... :eek:
 
Killyp said:
I've put the files in the following directory:

the hard disk is "HD1"

the folder is "palmdesktop" (straight inside the root of the hard disk)
and the file is "Localized.rsrc"

what would be the exact thing that I type into Terminal??

I'm used to DOS syntax... :eek:
'rm /palmdesktop/Localized.rsrc' without the single quotes
 
okay, so I removed the Localized.rsrc file (yay! thanks!) but there's still a copy of it inside the original file.

The file is located in rm /palmdesktop/ and is called PalmDesktop


I cannot remove this file, it gives me the same error message...
When I enter the syntax posted above into Terminal with the ending changed for that 'file', it says This is a Directory. How do I change that so it removes a directory instead?

many, MANY thanks guys!!!
 
Killyp said:
I've put the files in the following directory:

the hard disk is "HD1"

the folder is "palmdesktop" (straight inside the root of the hard disk)
and the file is "Localized.rsrc"

what would be the exact thing that I type into Terminal??

I'm used to DOS syntax... :eek:

If you want to do the lsof thing, you'd type the following:

lsof | grep Localized.rsrc

The | symbol is that key next to the return key in case you don't know.

One thing is that if you are not sure about pathnames, just drag the file into the terminal window. So if you wanted to do what was mentioned above, you would type rm into the terminal and the just drag the file into the window and hit return.
 
Did you try doing a "Secure Empty"? The same thing happened to me when I tried to delete WMP from my computer. Someone advised me to do a secure empty, and it worked.
 
There's probably an instance of Transport Monitor running. Kill this from Activity Monitor. Then you should be able to remove PalmDesktop from Applications.
 
I get the same error the OP indicated every time I try to empty the trash if a file is in there that I was just using in Preview, even though I closed the file. In order to delete I have to either quit Preview or Relaunch Finder and it will then allow me. Stupid Preview, or maybe stupid Finder
 
Okay, this is really wierd! I've done the LSOF thing, and it removed all the localized.rsrc files on the hard disk.

The problem in the first place was that the RSRC file was inside an application package, and this was what I couldn't remove. I can't open the package to uninstall it or anything...

When I enter the package's directory into terminal with the LSOF command, it says it's removed all the files, but when I drag the Package into the trash, and empty it, it still says "Localized.rsrc is in use" even though I can't find a localized.rsrc anywhere in the folder!!

There is actually more than one package, but I moved them all into one folder in the "HD1" root (HD1 is my startup disk) to see if I could remove the folder. It allows me to move the files around, but not delete them...

So how do I remove a directory in terminal?
 
You remove directories by using "rmdir" in place of "rm"...but I still feel like this should be able to be resolved with a restart. If you check your login items to make sure no component of that software is loading on startup, you should be able to restart and then delete whatever you want at will.
 
Killyp said:
Okay, this is really wierd! I've done the LSOF thing, and it removed all the localized.rsrc files on the hard disk.

LSOF doesn't remove files, it just tells you what's using them. What the command I wrote actually does is list the current user's open files and narrows the list down using grep to isolate the file in question.

RM is the command that removes the files.

Killyp said:
The problem in the first place was that the RSRC file was inside an application package, and this was what I couldn't remove. I can't open the package to uninstall it or anything...

If it was inside a package, it's most likely that application that's causing the issue. It may still be running. If you open the activity monitor (in /Applications/Utilities/) you can see if palmdesktop or a related program like the one someone else mentioned is still running. If so, quit the program.

The Activity monitor is really useful because if you select a process and inspect it with the blue i button or command-i, there is a tab listing the open files for the process.

Killyp said:
So how do I remove a directory in terminal?

I would use rm -rf and then drag the folder into the terminal.
 
Hold down Option while selecting Empty Trash. I rarely have luck with this method, but it's worth a shot.
 
Ahh, the LSOF command has revealed that it's Finder that's using the file...

Even after a reboot (or two), Finder still won't let me remove them!

Is there any way I can empty the trash while finder isn't running?
 
Killyp said:
Ahh, the LSOF command has revealed that it's Finder that's using the file...

Even after a reboot (or two), Finder still won't let me remove them!

Is there any way I can empty the trash while finder isn't running?
Have you closed down Transport Monitor? This is a Palm process that checks for the Palm handheld being connected, and sync started. If you did the standard install, it'll be running as a StartupItem.
 
Yay! Done it!

I quit terminal in Activity Monitor, and then entered this command into Terminal:

rm -rf ~/.Trash/*

I then restarted Finder, and all was well!

One small problem, when you move a file to the trash, it seems to keep it connected to the hard disk partition it was originally on. When I first had this problem, I went a bit crazy, trying to move files between partition, but I ended up duplicating them...

So, the rm -rf ~/.Trash/* command only seems to remove the files in the trash from one partition, (named HD1, my Startup disk). How do I remove the files from the secondary partition (HD2)?
 
Killyp said:
One small problem, when you move a file to the trash, it seems to keep it connected to the hard disk partition it was originally on. When I first had this problem, I went a bit crazy, trying to move files between partition, but I ended up duplicating them...

So, the rm -rf ~/.Trash/* command only seems to remove the files in the trash from one partition, (named HD1, my Startup disk). How do I remove the files from the secondary partition (HD2)?

Every partition has its own trash folder. This is necessary because it means you can delete stuff without the system copying files to one main trash directory. On external drives, this folder is in the root folder called .Trashes (note not .Trash).

You may need admin permissions to see it. If you type this into terminal, it will list the trash contents on a drive:

sudo ls -al /Volumes/<drive name>/.Trashes

It will ask for you password.

Normally, the trashes folder has a list of folders named by user ID. I think 502 is the default admin ID so inside .Trashes there should be a folder called 502. To see what's in there, you would just do this:

sudo ls -al /Volumes/<drive name>/.Trashes/502

to empty it, you would type

sudo rm -rf /Volumes/<drive name>/.Trashes/502/*

Again to save typing the name, you can drag the volume to the terminal but don't drag it from the Finder sidebar. This will just remove the drive from the sidebar. If you don't mount volumes on the desktop, add the computer to your Finder sidebar (or go menu>computer) and access it there.

You can also use tab as an autofill so if you type /V (for /Volumes... above) and then tab, it will fill in the rest of the name.

In general, it's not a good idea to use sudo rm. Save it for those times when it's absolutely necessary. You can actually erase important stuff that way. This is why it's good to drag stuff to the terminal too because if you accidentally left a space out between the first / and what came after it, you'd erase your entire partition.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.