Editing 1888: Still in Use

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 16: Line 16:
 
Preventing the file from being deleted from the file system in this case may be a correct behavior, because the document is still being worked on. But sometimes it may happen erroneously, perhaps because of a program not closing the file properly, a glitch in the operating system, or user error. The user then is required to find the cause of the problem and rectify it before the file can be deleted. This may be difficult because error messages may not reveal the affected file or the program blocking its removal. Similar problems may occur when unmounting (or "safely removing") a removable storage device.
 
Preventing the file from being deleted from the file system in this case may be a correct behavior, because the document is still being worked on. But sometimes it may happen erroneously, perhaps because of a program not closing the file properly, a glitch in the operating system, or user error. The user then is required to find the cause of the problem and rectify it before the file can be deleted. This may be difficult because error messages may not reveal the affected file or the program blocking its removal. Similar problems may occur when unmounting (or "safely removing") a removable storage device.
  
βˆ’
The title text may refer to a simple solution to these sorts of problems: Wait a while, perhaps overnight, and see if the (unknown) application(s) have closed the open file(s). Alternatively, the user can shut down the system to make absolutely sure that nothing is using anything. This is usually effective and harmless -- programs that ''falsely'' flagged something in the recycle bin as "in use" usually won't recreate the problem when the computer finishes booting up -- but this is really not a convenient solution for the user because all applications are closed.
+
The title text may refer to a simple solution to these sorts of problems: Wait a while, perhaps overnight, and see if the (unknown) application(s) have closed the open file(s). Alternatively, the user can shut down the system to make absolutely sure that nothing is using anything. But this latter solution is really not a convenient one because all applications are closed.
  
 
== Solutions ==
 
== Solutions ==
Line 22: Line 22:
  
 
Some tools:
 
Some tools:
βˆ’
* On Windows, the [https://docs.microsoft.com/en-us/sysinternals/downloads/handle "handle"] command line tool allows listing, searching, and closing file handles, showing the associated process.
+
* On Windows Vista and above, one may use the "Task Manager" and the aptly named "Resource Monitor". Nevertheless there is also still the [https://docs.microsoft.com/en-us/sysinternals/downloads/procmon "Process Monitor"] from Sysinternals available at Microsoft.
βˆ’
* On Linux and OS X there is a command line tool {{w|lsof}} (list open files) which also lists open sockets and more. If the filename or program name is known, the usefulness of this tool is vastly enhanced by combining it with {{w|grep}}.
+
* On Linux and OS X there is a command line tool {{w|lsof}} (list open files) which also lists open sockets and more. If the filename or program name is known, the usefulness of this tool is vastly enhanced by combining it with {{w|grep}} because dispensable lines can be omitted.
 
* Unix systems derived from SVR4 have the {{w|fuser (Unix)|fuser(1)}} command (fstat(1) on BSD) that lists and optionally kills the process keeping a file open. It's useful on shutdowns because open files can prevent unmounting filesystems, potentially leaving them a mess.
 
* Unix systems derived from SVR4 have the {{w|fuser (Unix)|fuser(1)}} command (fstat(1) on BSD) that lists and optionally kills the process keeping a file open. It's useful on shutdowns because open files can prevent unmounting filesystems, potentially leaving them a mess.
  

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)