0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

lsof

Last updated at Posted at 2023-07-19

firefoxが46784portで通信している

[linuxstudy@localhost ~]$ lsof -i:46784
COMMAND  PID       USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
firefox 3040 linuxstudy   84u  IPv4 103812      0t0  TCP localhost.localdomain:46784->55.65.117.34.bc.googleusercontent.com:https (ESTABLISHED)
       +|-f [cfgGn]
                f by itself clarifies how path name arguments are to be interpreted.  When followed by c, f, g, G, or
                n  in  any  combination  it  specifies that the listing of kernel file structure information is to be
                enabled (`+') or inhibited (`-').

                Normally a path name argument is taken to be a file system name if it matches a mounted-on  directory
                name  reported by mount(8), or if it represents a block device, named in the mount output and associ‐
                ated with a mounted directory name.  When +f is specified, all path name arguments will be  taken  to
                be  file  system names, and lsof will complain if any are not.  This can be useful, for example, when
                the file system name (mounted-on device) isn't a block device.  This happens  for  some  CD-ROM  file
                systems.

                When  -f is specified by itself, all path name arguments will be taken to be simple files.  Thus, for
                example, the ``-f -- /'' arguments direct lsof to search for open files with a `/' path name, not all
                open files in the `/' (root) file system.

                Be  careful  to make sure +f and -f are properly terminated and aren't followed by a character (e.g.,
                of the file or file system name) that might be taken as a parameter.  For example, use  ``--''  after
                +f and -f as in these examples.

                     $ lsof +f -- /file/system/name
                     $ lsof -f -- /file/name

file systemって?

[linuxstudy@xxxx ~]$ lsof +f -- /dev/null
lsof: not a file system: /dev/null
lsof 4.87
 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
 latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
 usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s]
 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [-Z [Z]] [--] [names]
Use the ``-h'' option to get more help information.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?