lsofps
Package: WA2L/WinTools 1.2.08
Section: General Commands (1)
Updated: 23 May 2025
Index
Return to Main Contents
NAME
lsofps - list processes of open files and allow killing it
SYNOPSIS
WA2LWinTools/lib/shell/lsofps
[
-h
|
-V
|
-i
|
-u
]
lsofps
[
-k
|
-K
] [
directory
|
.
]
lsofps
[
-k
|
-K
] [
file
]
AVAILABILITY
WA2L/WinTools
DESCRIPTION
list processes that have files open in the given
directory
or have the given
file
open.
The listed processes can be killed if
selected to free up the locks.
Be aware that killing processes is not always without
risks.
However, if processes are killed before you saved
the data, often the unsaved data will be lost.
Furthermore because the
lsofps
command runs with normal user permissions,
only processes that were started by that user
can be killed.
When no
directory
or
file
is specified,
the locks of the whole drive from where the
lsofps
command was started are listed.
When pressing the
[SHIFT]
key while starting the
lsofps
command,
the locks of the drive of the selected
directory
or
file
are listed.
This especially helps when starting the
command using
'SendTo'
because the
'SendTo'
menu is not accessible on drive letters.
The
lsofps
command should be installed to the
'Send To'
context menu in
'Microsoft™ Windows Explorer'
for most convenient usage.
To do so, select the related option in
config(1m).
OPTIONS
- -h
-
usage message.
- -V
-
print program version.
- -i
-
install the
lsofps
command as menu point
to the
'Send To'
context menu in
'Windows Explorer'.
- -u
-
uninstall the
lsofps
shortcut from the
'Send To'
context menu in
'Windows Explorer'.
- -k
-
query to kill the processes identified to
lock files in the given
directory
or the given
file.
- -K
-
kill the processes identified to
lock files in the given
directory
or the given
file
without prompting.
- directory
-
directory for which to check open files.
- .
-
list the open files of the current working
directory.
- file
-
file to check if it is open.
-
-
list the open files of the whole drive of the
working directory where the
lsofps
command is started.
ENVIRONMENT
-
EXIT STATUS
- 0
-
no error.
- 1
-
given
directory
or
file
not found.
- 4
-
usage message displayed.
- 5
-
program version printed.
FILES
-
EXAMPLES
-
SEE ALSO
wintoolsintro(1),
config(1m),
handle(1),
kill(1m)
NOTES
The
lsofps
uses
handle(1)
internally to resolve the open files.
The
handle
command on 'Microsoft™ Windows' is basically that,
what the
lsof
command is on UNIX/Linux.
BUGS
-
AUTHOR
lsofps was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2025
Christian Walther
This is free software; see
WA2LWinTools/man/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 07:39:26 GMT, May 24, 2025