On Tuesday 18 October 2005 20:12, Sandy Drobic wrote:
Steve Graegert wrote:
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
As can be read in the OP Juan already tried to do so and found that it is "locked" (whatever it means). Hmm, what now?
Find out what process is locking the file and kill it: fuser -k -i /path/to/file
Files aren't locked that way in linux, you can delete a file even if a million applications were holding it open (although of course it wouldn't be finally deleted until the last program exited or closed the file, but it wouldn't be visible in the directory anymore) The directory must be "locked" (as in having a pad lock on the icon on the desktop) because it's owned by another user. If it were a single file or an empty directory you would be able to delete it anyway without becoming root, but a directory with files in it is worse. You can rename it if you like, but to delete it you need to become root, since you need to delete the files in the directory as well as the directory itself.