Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
120 user(s) are online (67 user(s) are browsing Forums)

Members: 2
Guests: 118

328gts, flash, more...

Headlines

 
  Register To Post  

(1) 2 »
Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
More often than not i cannot figure out why a delete is refused with the message "object is in use" Most irritating is an empty directory. It happens with Filer as well as from shell.

What can be the causes i overlook ? (a file used in some application, an icon that is put in Amidock or left out on WB?? )

Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
It means that a program has still locked a file/directoy.

Happens to me mostly after a program crashed or has a bug where a lock is not freed when the program is closed.

Normally i need to reboot to be able to delete such a file/directory

edit: Filer i don't know.
The shell thing is new to me, you can try to close down shell and try to work with the file from Workbench

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
I am cleaning up a partition in which i did a backup of my "OS4.1 update 1" files. I get this problem with files that surely are not used anywhere
example :
an 'internet' drawer, which contains only an empty 'action logs' drawer.
I can't delete it and neither the 'action logs' drawer, even with workbench.
I am going to reboot and try again



Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
Hmm, the only other thing i could think of is a corrupted drawer/file

I got that behaviour with crippled files i copied to a NAS server where it mangled some files in the process due to not supported chars in the filename and/or a missing file comment support (iirc the latest "copy" command checks for comments and deletes them automatically when copying to a foreign fs...but thats ot )

If it seems to be corrupted and you don't have a chance to delete it, there is only format (at least *i* had to use it back then)

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
I was able to delete them after a reboot.

My problem may be due to using different filemanagers (plus shell and WB drawers) at the same time. I am going to check that more accurately.

Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
Well, as i said...one reason might be that a program that has been closed still holds a lock to a (now emtpy) directory.

I'd start by checking your filemanagers, might be worth it, filer is iirc still in development?

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Deleting files or directories, object in use
Quite a regular
Quite a regular


See User information
Probably your program is somewhat assigned to its directory. Try remove the assign by entering the REMOVE option in the Assign command from CLI.

To Be A True Adventurer, You Ought To Play Real Text Adventures
Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
Heh, good call

Although i doubt that a program puts an assign to a subdir in a subdir...unless it does it while working on the dir.

I still think it's a not freed lock

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
either an assign or an app that locks the directory but doesnt free it at on exit. I have found this on many apps, specially with locked images that arent freed on exit etc. Ofcourse the apps that does this i report to the authors and they fixed it.

On reboot you can ofcourse delete if its not a directory that is assigned in user-startup ofcourse.

You can use Scout to remove locked directories/files etc or just reboot.


Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
@kicko

Quote:
Ofcourse the apps that does this i report to the authors and they fixed it


Erm. sure about that?

X5000
Go to top
Re: Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
Ok then... not all coders fix it, but mostly ;)

Go to top
Re: Deleting files or directories, object in use
Quite a regular
Quite a regular


See User information
Some obvious causes:

1. If you cd to a drawer in a Shell, then try to delete the drawer, the Shell has a lock on the drawer while you are cd'ed to it.
2. If you have a window open on WB, in Filer or DOpus, there is a lock on the drawer.

Of course, if you are cleaning out a partition, it's quicker and safer to Format Quick the partition.

cheers
tony
Go to top
Re: Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
All very interesting & helpfull: thanks

Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
@Kicko Quote:
You can use Scout to remove locked directories/files etc or just reboot.

You CAN, but usually I find this causes OS4 to become unstable & crash after a while. (Even though the relevant program no-longer seems to be running.)

Author of the PortablE programming language.
Go to top
Re: Deleting files or directories, object in use
Not too shy to talk
Not too shy to talk


See User information

If a directory is still locked after a reboot, there is a simple trick: rename it to "delete_me" or similar and then reboot again. After that you should be able to delete it.

Go to top
Re: Deleting files or directories, object in use
Quite a regular
Quite a regular


See User information
^ I do this simply if I want to have another file with the name _before_ a boot.

Go to top
Re: Deleting files or directories, object in use
Just can't stay away
Just can't stay away


See User information
Hi guys,
@JosDuchIt #1
... cannot figure out why a delete is refused with the message "object is in use" Most irritating is an empty directory. It happens with Filer as well as from shell.

That's happened so many times here... I run prgs from Ram Disk before storing them. When you delete the program, you get the error.

@Raziel #2
It means that a program has still locked a file/directoy.

Could it be just a behavior of Ram Disk? That's where it occurs; never saw the error anywhere else.

Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
@Snuffy

Most probably yes, i do that too.
Installing programs to Ram:, trying them, if they meet my standards install them to my Tools: partition

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Deleting files or directories, object in use
Home away from home
Home away from home


See User information
That's funny sometimes i have exactly the same problem (bug?) on my Windows XP box

But i note that also on AmigaOS4 ...

Go to top
Re: Deleting files or directories, object in use
Quite a regular
Quite a regular


See User information
The rename into "delete_me" trick is great. You can't do that on windows with a locked file or dir But on Amiga you can always rename or move (on the same partition) any file or dir that is locked.

But "object in use" is otherwise very logical:
- A program was started from a directory would lock that directory (but not the program executable).
- Some program is into a directory (like Filer, or the shell or WB having a drawer open) would lock that directory.
- A program that crashed would lock the executable as long as the Grim Reaper is open.
- An assign to a directory would add a lock to the directory.
- Any file that is being read or written to would be locked. A log file may for example always be opened and therefore locked.

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project