neulab/tldr huggingface dataset:
If you're not sure your dialect supplies alternate device numbers for file systems from its mount table, use this lsof incantation to see if it reports any alternate device numbers:
lsof -b
Look for standard error file warning messages that begin ``assuming "dev=xxxx" from ...''.
Lsof is able to examine the kernel's name cache or use other kernel facilities (e.g., the ADVFS 4.x tag_to_path() function under Tru64 UNIX) on some dialects for most file system types, excluding AFS, and extract recently used path name components from it.  (AFS file system path lookups don't use the kernel's name cache; some Solaris VxFS file system operations apparently don't use it, either.)
Lsof reports the complete paths it finds in the NAME column.  If lsof can't report all components in a path, it reports in the NAME column the file system name, followed by a space, two `-' characters, another space, and the name components it has located, separated by the `/' character.
When lsof is run in repeat mode - i.e., with the -r option specified - the extent to which it can report path name components for the same file may vary from cycle to cycle.  That's because other running processes can cause the kernel to remove entries from its name cache and replace them with others.
Lsof's use of the kernel name cache to identify the paths of files can lead it to report incorrect components under some circumstances.  This can happen when the kernel name cache uses device and node number as a key (e.g., SCO OpenServer) and a key on a rapidly changing file system is reused.  If the UNIX dialect's kernel doesn't purge the name cache entry for a file when it is unlinked, lsof may find a reference to the wrong entry in the cache.  The lsof FAQ (The FAQ section gives its location.) has more information on this situation.
Lsof can report path name components for these dialects:
FreeBSD HP-UX Linux NetBSD NEXTSTEP OpenBSD OPENSTEP SCO OpenServer SCO|Caldera UnixWare Solaris Tru64 UNIX
Lsof can't report path name components for these dialects:
If you want to know why lsof can't report path name components for some dialects, see the lsof FAQ (The FAQ section gives its location.)
Examining all members of the /dev (or /devices) node tree with stat(2) functions can be time consuming.  What's more, the information that lsof needs - device number, inode number, and path - rarely changes.
Consequently, lsof normally maintains an ASCII text file of cached /dev (or /devices) information (exception: the /proc-based Linux lsof where it's not needed.)  The local system administrator who builds lsof can control the way the device cache file path is formed, selecting from these options:
Path from the -D option; Path from an environment variable; System-wide path; Personal path (the default); Personal path, modified by an environment variable.
Consult the output of the -h, -D? , or -?  help options for the current state of device cache support.  The help output lists the default read-mode device cache file path that is in effect for the current invocation of lsof.  The -D?  option output lists the read-only and write device cache file paths, the names of any applicable environment variables, and the personal device cache path format.
Lsof can detect that the current device cache file has been accidentally or maliciously modified by integrity checks, including the computation and verification of a sixteen bit Cyclic Redundancy Check (CRC) sum on the file's contents.  When lsof senses something wrong with the file, it issues a warning and attempts to remove the current cache file and create a new copy, but only to a path that the process can legitimately write.
The path from which a lsof process may attempt to read a device cache file may not be the same as the path to which it can legitimately write. Thus when lsof senses that it needs to update the device cache file, it may choose a different path for writing it from the path from which it read an incorrect or outdated version.
If available, the -Dr option will inhibit the writing of a new device cache file.  (It's always available when specified without a path name argument.)
When a new device is added to the system, the device cache file may need to be recreated.  Since lsof compares the mtime of the device cache file with the mtime and ctime of the /dev (or /devices) directory, it usually detects that a new device has been added; in that case lsof issues a warning message and attempts to rebuild the device cache file.
Whenever lsof writes a device cache file, it sets its ownership to the real UID of the executing process, and its permission modes to 0600, this restricting its reading and writing to the file's owner.
Two permissions of the lsof executable affect its ability to access device cache files.  The permissions are set by the local system administrator when lsof is installed.
The first and rarer permission is setuid-root.  It comes into effect when lsof is executed; its effective UID is then root, while its real (i.e., that of the logged-on user) UID is not.  The lsof distribution recommends that versions for these dialects run setuid-root.
HP-UX 11.11 and 11.23 Linux
The second and more common permission is setgid.  It comes into effect when the effective group IDentification number (GID) of the lsof process is set to one that can access kernel memory devices - e.g., ``kmem'', ``sys'', or ``system''.
An lsof process that has setgid permission usually surrenders the permission after it has accessed the kernel memory devices.  When it does that, lsof can allow more liberal device cache path formations.  The lsof distribution recommends that versions for these dialects run setgid and be allowed to surrender setgid permission.
AIX 5.[12] and 5.3-ML1 Apple Darwin 7.x Power Macintosh systems FreeBSD 4.x, 4.1x, 5.x and [6789].x for x86-based systems FreeBSD 5.x, [6789].x and 1[012].8for Alpha, AMD64 and Sparc64 based systems HP-UX 11.00 NetBSD 1.[456], 2.x and 3.x for Alpha, x86, and SPARC-based systems NEXTSTEP 3.[13] for NEXTSTEP architectures OpenBSD 2.[89] and 3.[0-9] for x86-based systems OPENSTEP 4.x SCO OpenServer Release 5.0.6 for x86-based systems SCO|Caldera UnixWare 7.1.4 for x86-based systems Solaris 2.6, 8, 9 and 10 Tru64 UNIX 5.1
(Note: lsof for AIX 5L and above needs setuid-root permission if its -X option is used.)
Lsof for these dialects does not support a device cache, so the permissions given to the executable don't apply to the device cache file.
DEVICE CACHE FILE PATH FROM THE -D OPTION The -D option provides limited means for specifying the device cache file path.  Its ?  function will report the read-only and write device cache file paths that lsof will use.
When the -D b, r, and u functions are available, you can use them to request that the cache file be built in a specific location (b[path]); read but not rebuilt (r[path]); or read and rebuilt (u[path]).  The b, r, and u functions are restricted under some conditions.  They are restricted when the lsof process is setuid-root.  The path specified with the r function is always read-only, even when it is available.
The b, r, and u functions are also restricted when the lsof process runs setgid and lsof doesn't surrender the setgid permission.  (See the LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS section for a list of implementations that normally don't surrender their setgid permission.)
A further -D function, i (for ignore), is always available.
When available, the b function tells lsof to read device information from the kernel with the stat(2) function and build a device cache file at the indicated path.
When available, the r function tells lsof to read the device cache file, but not update it.  When a path argument accompanies -Dr, it names the device cache file path.  The r function is always available when it is specified without a path name argument.  If lsof is not running setuid-root and surrenders its setgid permission, a path name argument may accompany the r function.
When available, the u function tells lsof to attempt to read and use the device cache file.  If it can't read the file, or if it finds the contents of the file incorrect or outdated, it will read information from the kernel, and attempt to write an updated version of the device cache file, but only to a path it considers legitimate for the lsof process effective and real UIDs.
Lsof's second choice for the device cache file is the contents of the LSOFDEVCACHE environment variable.  It avoids this choice if the lsof process is setuid-root, or the real UID of the process is root.
A further restriction applies to a device cache file path taken from the LSOFDEVCACHE environment variable: lsof will not write a device cache file to the path if the lsof process doesn't surrender its setgid permission.  (See the LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS section for information on implementations that don't surrender their setgid permission.)
The local system administrator can disable the use of the LSOFDEVCACHE environment variable or change its name when building lsof.  Consult the output of -D?  for the environment variable's name.
SYSTEM-WIDE DEVICE CACHE PATH The local system administrator may choose to have a system-wide device cache file when building lsof.  That file will generally be constructed by a special system administration procedure when the system is booted or when the contents of /dev or /devices) changes.  If defined, it is lsof's third device cache file path choice.
You can tell that a system-wide device cache file is in effect for your local installation by examining the lsof help option output - i.e., the output from the -h or -?  option.
Lsof will never write to the system-wide device cache file path by default.  It must be explicitly named with a -D function in a root-owned procedure.  Once the file has been written, the procedure must change its permission modes to 0644 (owner-read and owner-write, group-read, and other-read).
PERSONAL DEVICE CACHE PATH (DEFAULT) The default device cache file path of the lsof distribution is one recorded in the home directory of the real UID that executes lsof.  Added to the home directory is a second path component of the form .lsof_hostname.
This is lsof's fourth device cache file path choice, and is usually the default.  If a system-wide device cache file path was defined when lsof was built, this fourth choice will be applied when lsof can't find the system-wide device cache file.  This is the only time lsof uses two paths when reading the device cache file.
The hostname part of the second component is the base name of the executing host, as returned by gethostname(2).  The base name is defined to be the characters preceding the first `.'  in the gethostname(2) output, or all the gethostname(2) output if it contains no `.'.
The device cache file belongs to the user ID and is readable and writable by the user ID alone - i.e., its modes are 0600.  Each distinct real user ID on a given host that executes lsof has a distinct device cache file. The hostname part of the path distinguishes device cache files in an NFS-mounted home directory into which device cache files are written from several different hosts.
The personal device cache file path formed by this method represents a device cache file that lsof will attempt to read, and will attempt to write should it not exist or should its contents be incorrect or outdated.
The -Dr option without a path name argument will inhibit the writing of a new device cache file.
The -D?  option will list the format specification for constructing the personal device cache file.  The conversions used in the format specification are described in the 00DCACHE file of the lsof distribution.
If this option is defined by the local system administrator when lsof is built, the LSOFPERSDCPATH environment variable contents may be used to add a component of the personal device cache file path.
The LSOFPERSDCPATH variable contents are inserted in the path at the place marked by the local system administrator with the ``%p'' conversion in the HASPERSDC format specification of the dialect's machine.h header file.  (It's placed right after the home directory in the default lsof distribution.)
Thus, for example, if LSOFPERSDCPATH contains ``LSOF'', the home directory is ``/Homes/abe'', the host name is ``lsof.itap.purdue.edu'', and the HASPERSDC format is the default (``%h/%p.lsof_%L''), the modified personal device cache file path is:
/Homes/abe/LSOF/.lsof_vic
The LSOFPERSDCPATH environment variable is ignored when the lsof process is setuid-root or when the real UID of the process is root.
Lsof will not write to a modified personal device cache file path if the lsof process doesn't surrender setgid permission.  (See the LSOF PERMISSIONS THAT AFFECT DEVICE CACHE FILE ACCESS section for a list of implementations that normally don't surrender their setgid permission.)
If, for example, you want to create a sub-directory of personal device cache file paths by using the LSOFPERSDCPATH environment variable to name it, and lsof doesn't surrender its setgid permission, you will have to allow lsof to create device cache files at the standard personal path and move them to your subdirectory with shell commands.
The local system administrator may: disable this option when lsof is built; change the name of the environment variable from LSOFPERSDCPATH to something else; change the HASPERSDC format to include the personal path component in another place; or exclude the personal path component entirely.  Consult the output of the -D?  option for the environment variable's name and the HASPERSDC format specification.
Errors are identified with messages on the standard error file.
Lsof returns a one (1) if any error was detected, including the failure to locate command names, file names, Internet addresses or files, login names, NFS files, PIDs, PGIDs, or UIDs it was asked to list.  If the -V option is specified, lsof will indicate the search items it failed to list.
It returns a zero (0) if no errors were detected and if it was able to list some information about all the specified search arguments.
When lsof cannot open access to /dev (or /devices) or one of its subdirectories, or get information on a file in them with stat(2), it issues a warning message and continues.  That lsof will issue warning messages about inaccessible files in /dev (or /devices) is indicated in its help output - requested with the -h or >B -?  options -  with the message:
Inaccessible /dev warnings are enabled.
The warning message may be suppressed with the -w option.  It may also have been suppressed by the system administrator when lsof was compiled by the setting of the WARNDEVACCESS definition.  In this case, the output from the help options will include the message:
Inaccessible /dev warnings are disabled.
Inaccessible device warning messages usually disappear after lsof has created a working device cache file.
For a more extensive set of examples, documented more fully, see the 00QUICKSTART file of the lsof distribution.
To list all open files, use:
To list all open Internet, x.25 (HP-UX), and UNIX domain files, use:
lsof -i -U
To list all open IPv4 network files in use by the process whose PID is 1234, use:
lsof -i 4 -a -p 1234
Presuming the UNIX dialect supports IPv6, to list only open IPv6 network files, use:
lsof -i 6
To list all files using any protocol on ports 513, 514, or 515 of host wonderland.cc.purdue.edu, use:
lsof -i @wonderland.cc.purdue.edu:513-515
To list all files using any protocol on any port of mace.cc.purdue.edu (cc.purdue.edu is the default domain), use:
lsof -i @mace
To list all open files for login name ``abe'', or user ID 1234, or process 456, or process 123, or process 789, use:
lsof -p 456,123,789 -u 1234,abe
To list all open files on device /dev/hd4, use:
lsof /dev/hd4
To find the process that has /u/abe/foo open, use:
lsof /u/abe/foo
To send a SIGHUP to the processes that have /u/abe/bar open, use:
kill -HUP `lsof -t /u/abe/bar`
To find any open file, including an open UNIX domain socket file, with the name /dev/log, use:
lsof /dev/log
To find processes with open files on the NFS file system named /nfs/mount/point whose server is inaccessible, and presuming your mount table supplies the device number for /nfs/mount/point, use:
lsof -b /nfs/mount/point
To do the preceding search with warning messages suppressed, use:
lsof -bw /nfs/mount/point
To ignore the device cache file, use:
lsof -Di
To obtain PID and command name field output for each process, file descriptor, file device number, and file inode number for each file of each process, use:
lsof -FpcfDi
To list the files at descriptors 1 and 3 of every process running the lsof command for login ID ``abe'' every 10 seconds, use:
lsof -c lsof -a -d 1 -d 3 -u abe -r10
To list the current working directory of processes running a command that is exactly four characters long and has an 'o' or 'O' in character three, use this regular expression form of the -c c option:
lsof -c /^..o.$/i -a -d cwd
To find an IP version 4 socket file by its associated numeric dot-form address, use:
lsof -i@128.210.15.17
To find an IP version 6 socket file (when the UNIX dialect supports IPv6) by its associated numeric colon-form address, use:
lsof -i@[0:1:2:3:4:5:6:7]
To find an IP version 6 socket file (when the UNIX dialect supports IPv6) by an associated numeric colon-form address that has a run of zeroes in it - e.g., the loop-back address - use:
lsof -i@[::1]
To obtain a repeat mode marker line that contains the current time, use:
lsof -rm====%T====
To add spaces to the previous marker line, use:
lsof -r "m==== %T ===="
Since lsof reads kernel memory in its search for open files, rapid changes in kernel memory may produce unpredictable results.
When a file has multiple record locks, the lock status character (following the file descriptor) is derived from a test of the first lock structure, not from any combination of the individual record locks that might be described by multiple lock structures.
Lsof can't search for files with restrictive access permissions by name unless it is installed with root set-UID permission.  Otherwise it is limited to searching for files to which its user or its set-GID group (if any) has access permission.
The display of the destination address of a raw socket (e.g., for ping) depends on the UNIX operating system.  Some dialects store the destination address in the raw socket's protocol control block, some do not.
Lsof can't always represent Solaris device numbers in the same way that ls(1) does.  For example, the major and minor device numbers that the lstat(2) and stat(2) functions report for the directory on which CD-ROM files are mounted (typically /cdrom) are not the same as the ones that it reports for the device on which CD-ROM files are mounted (typically /dev/sr0).  (Lsof reports the directory numbers.)
The support for /proc file systems is available only for BSD and Tru64 UNIX dialects, Linux, and dialects derived from SYSV R4 - e.g., FreeBSD, NetBSD, OpenBSD, Solaris, UnixWare.
Some /proc file items - device number, inode number, and file size - are unavailable in some dialects.  Searching for files in a /proc file system may require that the full path name be specified.
No text (txt) file descriptors are displayed for Linux processes.  All entries for files other than the current working directory, the root directory, and numerical file descriptors are labeled mem descriptors.
Lsof can't search for Tru64 UNIX named pipes by name, because their kernel implementation of lstat(2) returns an improper device number for a named pipe.
Lsof can't report fully or correctly on HP-UX 9.01, 10.20, and 11.00 locks because of insufficient access to kernel data or errors in the kernel data.  See the lsof FAQ (The FAQ section gives its location.)  for details.
The AIX SMT file type is a fabrication.  It's made up for file structures whose type (15) isn't defined in the AIX /usr/include/sys/file.h header file.  One way to create such file structures is to run X clients with the DISPLAY variable set to ``:0.0''.
The +|-f[cfn] option is not supported under /proc-based Linux lsof, because it doesn't read kernel structures from kernel memory.
Lsof may access these environment variables.
LANG              defines a language locale.  See setlocale(3) for the names of other variables that can be used in place of LANG - e.g., LC_ALL, LC_TYPE, etc.
LSOFDEVCACHE      defines the path to a device cache file.  See the DEVICE CACHE PATH FROM AN ENVIRONMENT VARIABLE section for more information.
LSOFPERSDCPATH    defines the middle component of a modified personal device cache file path.  See the MODIFIED PERSONAL DEVICE CACHE PATH section for more information.
Frequently-asked questions and their answers (an FAQ) are available in the 00FAQ file of the lsof distribution.
That latest version of the file is found at:
https://github.com/lsof-org/lsof/blob/master/00FAQ
/dev/kmem         kernel virtual memory device
/dev/mem          physical memory device
/dev/swap         system paging device
.lsof_hostname    lsof's device cache file (The suffix, hostname, is the first component of the host's name returned by gethostname(2).)
Lsof was written by Victor A.Abell <abe@purdue.edu> of Purdue University. Since version 4.93.0, the lsof-org team at GitHub maintains lsof.  Many others have contributed to lsof.  They're listed in the 00CREDITS file of the lsof distribution.
The latest distribution of lsof is available at
https://github.com/lsof-org/lsof/releases
Not all the following manual pages may exist in every UNIX dialect to which lsof has been ported.
access(2), awk(1), crash(1), fattach(3C), ff(1), fstat(8), fuser(1), gethostname(2), isprint(3), kill(1), localtime(3), lstat(2), modload(8), mount(8), netstat(1), ofiles(8L), open(2), perl(1), ps(1), readlink(2), setlocale(3), stat(2), strftime(3), time(2), uname(1).
FKILL(1)                          User Commands                         FKILL(1)
fkill - fabulously kill processes
fkill [<pid|name> ...]
To kill a port, prefix it with a colon.  For example: :8080.
Run without arguments to use the interactive interface.  In interactive mode, 🚦n% indicates high CPU usage and 🐏n% indicates high memory usage.
The process name is case insensitive.
-f, --force Force kill
-v, --verbose Show process arguments
-s, --silent Silently kill and always exit with code 0
$ fkill 1337 $ fkill safari $ fkill :8080 $ fkill 1337 safari :8080 $ fkill
kill(1), killall(1), pkill(1)
MIMETYPE(1)            User Contributed Perl Documentation           MIMETYPE(1)
mimetype - Determine file type
mimetype [options] [-] files
This script tries to determine the mime type of a file using the Shared MIME-info database. It is intended as a kind of file(1) work-alike, but uses mimetypes instead of descriptions.
If one symlinks the file command to mimetype it will behave a little more compatible, see "--file-compat".  Commandline options to specify alternative magic files are not implemented the same because of the conflicting data formats.  Also the wording of the descriptions will differ.
For naming switches I followed the manpage of file(1) version 4.02 when possible. They seem to differ completely from the spec in the 'utilities' chapter of IEEE Std 1003.1-2001 (POSIX).
-a, --all Show output of all rules that match the file.
TODO: this method now just returns one match for each method (globs, magic, etc.).
--database=mimedir:mimedir:... Force the program to look in these directories for the shared mime- info database. The directories specified by the basedir specification are ignored.
-d, --describe Print file descriptions instead of mime types, this is the default when using "--file-compat".
-D, --debug Print debug information about how the mimetype was determined.
-f namefile, --namefile=namefile Read the names of the files to be examined from the file 'namefile' (one per line) before the argument list.
--file-compat Make mimetype behave a little more file(1) compatible. This is turned on automatically when you call mimetype by a link called 'file'.
A single '-' won't be considered a separator between options and filenames anymore, but becomes identical to "--stdin".  ( You can still use '--' as separator, but that is not backward compatible with the original file command. ) Also the default becomes to print descriptions instead of mimetypes.
-F string, --separator=string Use string as custom separator between the file name and its mimetype or description, defaults to ':' .
-h, --help -u, --usage Print a help message and exits.
-i, --mimetype Use mime types, opposite to "--describe", this is the default when _not_ using "--file-compat".
-L, --dereference Follow symbolic links.
-l code, --language=code The language attribute specifies a two letter language code, this makes descriptions being outputted in the specified language.
-M, --magic-only Do not check for extensions, globs or inode type, only look at the content of the file. This is particularly useful if for some reason you don't trust the name or the extension a file has.
-N, --noalign Do not align output fields.
--output-format If you want an alternative output format, you can specify a format string containing the following escapes:
%f for the filename %d description %m mime type
Alignment is not available when using this, you need to post-process the output to do that.
--stdin Determine type of content from STDIN, less powerful then normal file checking because it only uses magic typing. This will happen also if the STDIN filehandle is a pipe.
To use this option IO::Scalar needs to be installed.
XDG_DATA_HOME XDG_DATA_DIRS These variables can list base directories to search for data files. The shared mime-info will be expected in the "mime" sub directory of one of these directories. If these are not set, there will be searched for the following directories:
$HOME/.local/share/mime /usr/local/share/mime /usr/share/mime
See also the "XDG Base Directory Specification" <http://freedesktop.org/Standards/basedir-spec>
The base dir for all data files is determined by two environment variables, see "ENVIRONMENT".
BASE/mime/packages/SOURCE.xml All other files are compiled from these source files. To re-compile them use update-mime-database(1).
BASE/mime/globs Compiled information about globs.
BASE/mime/magic Compiled information about magic numbers.
BASE/mime/MEDIA/SUBTYPE.xml Descriptions of a mimetype in multiple languages, used for the "--describe" switch.
If a file has an empty mimetype or an empty description, most probably the file doesn't exist and the given name doesn't match any globs. An empty description can also mean that there is no description available in the language you specified.
The program exits with a non-zero exit value if either the commandline arguments failed, a module it depends on wasn't found or the shared mime- info database wasn't accessible. See File::MimeInfo for more details.
The '--all' switch doesn't really show all matches, but only one per mime-typing method. This needs to be implemented in the modules first.
If you find bugs, please file them in our Github issue tracker at <https://github.com/mbeijen/File-MimeInfo/issues>.
mimetype doesn't provide a switch for looking inside compressed files because it seems to me that this can only be done by un-compressing the file, something that defeats the purpose. On the other hand the option should exist for strict compatibility with file(1). Possibly a subclass should be made for this one day.
Jaap Karssenberg <pardus@cpan.org> Maintained by Michiel Beijen <michiel.beijen@gmail.com>
Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved.  This program is free software; you can redistribute it and/or modify it under the same terms as Perl.
file(1), update-mime-database(1), File::MimeInfo(3), <http://freedesktop.org/Software/shared-mime-info>
UNAME(1)                          User Commands                         UNAME(1)
uname - print system information
uname [OPTION]...
Print certain system information.  With no OPTION, same as -s.
-a, --all print all information, in the following order, except omit -p and -i if unknown:
-s, --kernel-name print the kernel name
-n, --nodename print the network node hostname
-r, --kernel-release print the kernel release
-v, --kernel-version print the kernel version
-m, --machine print the machine hardware name
-p, --processor print the processor type (non-portable)
-i, --hardware-platform print the hardware platform (non-portable)
-o, --operating-system print the operating system
arch(1), uname(2)
Full documentation <https://www.gnu.org/software/coreutils/uname> or available locally via: info '(coreutils) uname invocation'
DPKG(8)                            dpkg suite                            DPKG(8)
dpkg - a medium-level package manager for Debian
dpkg [options] action
This manual is intended for users wishing to understand dpkg's command line options and package states in more detail than that provided by dpkg --help.
It should not be used by package maintainers wishing to understand how dpkg will install their packages.  The descriptions of what dpkg does when installing and removing packages are particularly inadequate.
dpkg is a medium-level tool to install, build, remove and manage Debian packages. The primary and more user-friendly front-end for dpkg is dselect(8).  dpkg itself is controlled entirely via command line parameters, which consist of exactly one action and zero or more options. The action-parameter tells dpkg what to do and options control the behavior of the action in some way.
dpkg can be also be used as a front-end to dpkg-deb.  The following are dpkg-deb actions, and if they are encountered, dpkg just runs dpkg-deb with the parameters given to it: -b, --build, -c, --contents, -I, --info, -f, --field, -e, --control, -x, --extract, -X, --vextract, and --fsys-tarfile. Please refer to dpkg-deb(1) for information about these actions.
dpkg maintains some usable information about available packages. The information is divided in three classes: states, selection states and flags.  These values are intended to be changed mainly with dselect.
PACKAGE STATES installed The package is unpacked and configured OK.
half-installed The installation of the package has been started, but not completed for some reason.
not-installed The package is not installed on your system.
unpacked The package is unpacked, but not configured.
half-configured The package is unpacked and configuration has been started, but not yet completed for some reason.
config-files Only the configuration files of the package exist on the system.
PACKAGE SELECTION STATES install The package is selected for installation.
deinstall The package is selected for deinstallation (i.e. we want to remove all files, except configuration files).
purge  The package is selected to be purged (i.e. we want to remove everything, even configuration files).
PACKAGE FLAGS hold   A package marked to be on hold is not handled by dpkg, unless forced to do that with option --force-hold.
reinst-required A package marked reinst-required is broken and requires reinstallation. These packages cannot be removed, unless forced with option --force-remove-reinstreq.
dpkg -i | --install package_file... Install the package. If --recursive or -R option is specified, package_file must refer to a directory instead.
Installation consists of the following steps:
1. Extract the control files of the new package.
2. If another version of the same package was installed before the new installation, execute prerm script of the old package.
3. Run preinst script, if provided by the package.
4. Unpack the new files, and at the same time back up the old files, so that if something goes wrong, they can be restored.
5. If another version of the same package was installed before the new installation, execute the postrm script of the old package. Note that this script is executed after the preinst script of the new package, because new files are written at the same time old files are removed.
6. Configure the package. See --configure for detailed information about how this is done.
dpkg --unpack package_file ... Unpack the package, but don't configure it. If --recursive or -R option is specified, package_file must refer to a directory instead.
dpkg --configure package ... | -a | --pending Reconfigure an unpacked package.  If -a or --pending is given instead of package, all unpacked but unconfigured packages are configured.
Configuring consists of the following steps:
1. Unpack the configuration files, and at the same time back up the old configuration files, so that they can be restored if something goes wrong.
2. Run postinst script, if provided by the package.
dpkg -r | --remove | -P | --purge package ... | -a | --pending Remove an installed package.  -r or --remove remove everything except configuration files.  This may avoid having to reconfigure the package if it is reinstalled later.  (Configuration files are the files listed in the debian/conffiles control file).  -P or --purge removes everything, including configuration files.  If -a or --pending is given instead of a package name, then all packages unpacked, but marked to be removed or purged in file /var/lib/dpkg/status, are removed or purged, respectively.
Removing of a package consists of the following steps:
1. Run prerm script
2. Remove the installed files
3. Run postrm script
dpkg --update-avail | --merge-avail Packages-file Update dpkg's and dselect's idea of which packages are available. With action --merge-avail, old information is combined with information from Packages-file.  With action --update-avail, old information is replaced with the information in the Packages-file. The Packages-file distributed with Debian is simply named Packages.  dpkg keeps its record of available packages in /var/lib/dpkg/available.
A simpler one-shot command to retrieve and update the available fileis dselect update.
dpkg -A | --record-avail package_file ... Update dpkg and dselect's idea of which packages are available with information from the package package_file.  If --recursive or -R option is specified, package_file must refer to a directory instead.
dpkg --forget-old-unavail Forget about uninstalled unavailable packages.
dpkg --clear-avail Erase the existing information about what packages are available.
dpkg -C | --audit Searches for packages that have been installed only partially on your system.  dpkg will suggest what to do with them to get them working.
dpkg --get-selections [pattern...] Get list of package selections, and write it to stdout.
dpkg --set-selections Set package selections using file read from stdin.
dpkg --yet-to-unpack Searches for packages selected for installation, but which for some reason still haven't been installed.
dpkg --print-architecture Print target architecture (for example, "i386").  This option uses gcc.
dpkg --print-gnu-build-architecture Print GNU version of target architecture (for example, "i486").
dpkg --print-installation-architecture Print host architecture for installation.
dpkg --compare-versions ver1 op ver2 Compare version numbers, where op is a binary operator.  dpkg returns success (zero result) if the specified condition is satisfied, and failure (nonzero result) otherwise.  There are two groups of operators, which differ in how they treat an empty ver1 or ver2.  These treat an empty version as earlier than any version: lt le eq ne ge gt.  These treat an empty version as later than any version: lt-nl le-nl ge-nl gt-nl.  These are provided only for compatibility with control file syntax: < << <= = >= >> >.
dpkg --command-fd <n> Accept a series of commands on input file descriptor <n>.  Note: additional options set on the command line, and thru this file descriptor, are not reset for subsequent commands executed during the same run.
dpkg --help Display a brief help message.
dpkg --force-help Give help about the --force-thing options.
dpkg -Dh | --debug=help Give help about debugging options.
dpkg --licence | dpkg --license Display dpkg licence.
dpkg --version Display dpkg version information.
dpkg-deb-actions See dpkg-deb(1) for more information about the following actions.
dpkg -b | --build directory [filename] Build a deb package. dpkg -c | --contents filename List contents of a deb package. dpkg -e | --control filename [directory] Extract control-information from a package. dpkg -x | --extract filename directory Extract the files contained by package. dpkg -f | --field  filename [control-field] ... Display control field(s) of a package. dpkg --fsys-tarfile filename Display the filesystem tar-file contained by a Debian package. dpkg -I | --info filename [control-file] Show information about a package. dpkg -X | --vextract filename directory Extract and display the filenames contained by a package.
dpkg-query-actions See dpkg-query(1) for more information about the following actions.
dpkg -l | --list package-name-pattern ... List packages matching given pattern. dpkg -s | --status package-name ... Report status of specified package. dpkg -L | --listfiles package ... List files installed to your system from package. dpkg -S | --search filename-search-pattern ... Search for a filename from installed packages. dpkg -p | --print-avail package Display details about package, as found in /var/lib/dpkg/available.
All options can be specified both on the commandline and in the dpkg configuration file /etc/dpkg/dpkg.cfg. Each line in the configuration file is either an option (exactly the same as the commandline option but without leading dashes) or a comment (if it starts with a #).
--abort-after=number Change after how many errors dpkg will abort. The default is 50.
-B|--auto-deconfigure When a package is removed, there is a possibility that another installed package depended on the removed package. Specifying this option will cause automatic deconfiguration of the package which depended on the removed package.
-Doctal | --debug=octal Set debugging on.  octal is formed by bitwise-orring desired values together from the list below (note that these values may change in future releases).  -Dh or --debug=help display these debugging values.
number  description 1   Generally helpful progress information 2   Invocation and status of maintainer scripts 10   Output for each file processed 100   Lots of output for each file processed 20   Output for each configuration file 200   Lots of output for each configuration file 40   Dependencies and conflicts 400   Lots of dependencies/conflicts output 1000   Lots of drivel about e.g. the dpkg/info dir 2000   Insane amounts of drivel
--force-things | --no-force-things | --refuse-things
Force or refuse (no-force and refuse mean the same thing) to do some things.  things is a comma separated list of things specified below.  --force-help displays a message describing them.  Things marked with (*) are forced by default.
Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system.
all: Turns on(or off) all force options.
auto-select(*): Select packages to install them, and deselect packages to remove them.
downgrade(*): Install a package, even if newer version of it is already installed.
Warning: At present dpkg does not do any dependency checking on downgrades and therefore will not warn you if the downgrade breaks the dependency of some other package.  This can have serious side effects, downgrading essential system components can even make your whole system unusable.  Use with care.
configure-any: Configure also any unpacked but unconfigured packages on which the current package depends.
hold: Process packages even when marked "hold".
remove-reinstreq: Remove a package, even if it's broken and marked to require reinstallation.  This may, for example, cause parts of the package to remain on the system, which will then be forgotten by dpkg.
remove-essential: Remove, even if the package is considered essential. Essential packages contain mostly very basic Unix commands. Removing them might cause the whole system to stop working, so use with caution.
depends: Turn all dependency problems into warnings.
depends-version: Don't care about versions when checking dependencies.
conflicts: Install, even if it conflicts with another package. This is dangerous, for it will usually cause overwriting of some files.
confmiss: Always install a missing configuration file. This is dangerous, since it means not preserving a change (removing) made to the file.
confnew: If a conffile has been modified always install the new version without prompting, unless the --force-confdef is also specified, in which case the default action is preferred.
confold: If a conffile has been modified always keep the old version without prompting, unless the --force-confdef is also specified, in which case the default action is preferred.
confdef: If a conffile has been modified always choose the default action. If there is no default action it will stop to ask the user unless --force-confnew or --force-confold is also been given, in which case it will use that to decide the final action.
overwrite: Overwrite one package's file with another's file.
overwrite-dir Overwrite one package's directory with another's file.
overwrite-diverted: Overwrite a diverted file with an undiverted version.
architecture: Process even packages with the wrong architecture.
bad-path: PATH is missing important programs, so problems are likely.
not-root: Try to (de)install things even when not root.
bad-verify: Install a package even if it fails authenticity check.
--ignore-depends=package,... Ignore dependency-checking for specified packages (actually, checking is performed, but only warnings about conflicts are given, nothing else).
--new | --old Select new or old binary package format. This is a dpkg-deb(1) option.
--nocheck Don't read or check contents of control file while building a package.  This is a dpkg-deb(1) option.
--no-act | --dry-run | --simulate Do everything which is supposed to be done, but don't write any changes. This is used to see what would happen with the specified action, without actually modifying anything.
Be sure to give --no-act before the action-parameter, or you might end up with undesirable results.  (e.g.  dpkg --purge foo --no-act will first purge package foo and then try to purge package --no-act, even though you probably expected it to actually do nothing)
-R | --recursive Recursively handle all regular files matching pattern *.deb found at specified directories and all of its subdirectories. This can be used with -i, -A, --install, --unpack and --avail actions.
-G     Don't install a package if a newer version of the same package is already installed. This is an alias of --refuse-downgrade.
--root=dir | --admindir=dir | --instdir=dir Change default directories.  admindir defaults to /var/lib/dpkg and contains many files that give information about status of installed or uninstalled packages, etc.  instdir defaults to / and refers to the directory where packages are to be installed. instdir is also the directory passed to chroot(2) before running package's installation scripts, which means that the scripts see instdir as a root directory.  Changing root changes instdir to dir and admindir to dir/var/lib/dpkg.
-O | --selected-only Only process the packages that are selected for installation. The actual marking is done with dselect or by dpkg, when it handles packages.  For example, when a package is removed, it will be marked selected for deinstallation.
-E | --skip-same-version Don't install the package if the same version of the package is already installed.
--status-fd <n> Send package status info to file descriptor <n>.  This can be given multiple times.  Status updates are of the form `status: <pkg>: <pkg qstate>'.
/etc/dpkg/dpkg.cfg Configuration file with default options.
The other files listed below are in their default directories, see option --admindir to see how to change locations of these files.
/var/lib/dpkg/available List of available packages.
/var/lib/dpkg/status Statuses of available packages. This file contains information about whether a package is marked for removing or not, whether it is installed or not, etc. See section INFORMATION ABOUT PACKAGES for more info.
The following files are components of a binary package.  See deb(5) for more information about them:
prerm
postrm
DPKG_NO_TSTP Define this to something if you prefer dpkg starting a new shell rather than suspending itself, while doing a shell escape.
SHELL  The program dpkg will execute while starting a new shell.
COLUMNS Sets the number of columns dpkg should use when displaying formatted text.  Currently only used by -l.
DPKG_OLD_CONFFILE Set by dpkg to the filename of the old configuration file when you start a shell to examine a changed configuration.  file.
DPKG_NEW_CONFFILE Set by dpkg to the filename of the newversion of a configuration file when you start a shell to examine a changed configuration. file.
To list packages related to the editor vi: dpkg -l '*vi*'
To see the entries in /var/lib/dpkg/available on two packages: dpkg --print-avail elvis vim | less
To search the listing of packages yourself: less /var/lib/dpkg/available
To remove an installed elvis package: dpkg -r elvis
To install a package, you first need to find it in an archive or CDROM. The "available" file shows that the vim package is in section "editors": cd /cdrom/hamm/hamm/binary/editors dpkg -i vim_4.5-3.deb
To make a local copy of the package selection states: dpkg --get-selections >myselections
You might transfer this file to another computer, and install it there with: dpkg --set-selections <myselections Note that this will not actually install or remove anything, but just set the selection state on the requested packages.  You will need some other application to actually download and install the requested packages.  For example, run dselect and choose "Install".
Ordinarily, you will find that dselect(8) provides a more convenient way to modify the package selection states.
Additional functionality can be gained by installing any of the following packages: apt, aptitude and debsums.
dselect(8), dpkg-deb(1), deb(5), deb-control(5), and dpkg-reconfigure(8)
--no-act usually gives less information than might be helpful.
See /usr/share/doc/dpkg/THANKS.gz for the list of people who have contributed to dpkg .
PIP(1)                                                                    PIP(1)
pip - A tool for installing and managing Python packages
pip <command> [options]
pip3 <command> [options]
pip is a Python package installer, recommended for installing Python packages which are not available in the Debian archive.  It can work with version control repositories (currently only Git, Mercurial, and Bazaar repositories), logs output extensively, and prevents partial installs by downloading all requirements before starting installation.
On Debian, pip is the command to use when installing packages for Python 2, while pip3 is the command to use when installing packages for Python 3.
The command comes before any options.  The following commands are recognized:
help   Show help for commands.
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list   List installed packages.
show   Show information about installed packages.
search Search PyPI for packages.
wheel  Build wheels from your requirements.
This list is by no means complete, and it only describes options available to all commands.  Use pip <command> --help for more details on command specific options.  A few command options are provided below.
-h, --help Show more detailed command help.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log-file <path> Path to a verbose non-appending log, that only logs failures. This log is active by default at ~/.pip/pip.log.
--log <path> Path to a verbose appending log.  This log is inactive by default.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
--cert <path> Path to alternate CA bundle.
pip install installs packages from:
• PyPI (a.k.a. The Cheeseshop) and other indexes, using requirements specifiers.
• VCS project urls.
• Local project directories.
• Local or remote source archives
-e,--editable <path/url> Install a project in editable mode (i.e.  setuptools "develop mode") from a local project path or a VCS url.
-r,--requirement <file> Install from the given requirements file.  This option can be used multiple times.