-f
-o
どのようにやり取りするのですps
か?報道によると、彼らは一緒に働くことになっていませんでしたps:出力修飾子と出力フォーマットの制御 そしてhttps://unix.stackexchange.com/a/446198/674、-f
フィールドは暗黙的に指定されるため、-o
ユーザーはフィールドを指定できます。
man ps
説明する
-f Do full-format listing. This option can be combined with many other UNIX-style options to add additional columns. It also causes the command arguments to be printed. When used with -L, the NLWP (number of threads) and LWP (thread ID) columns will be added. See the c option, the format keyword args, and the format keyword comm. f ASCII art process hierarchy (forest).
無関係なオプション/パラメータのようです。
しかし、なぜ
ps -f -o cmd
のようにps f
父と息子の関係を示していますか?ps -f -o ...
ps f
? と同じ数のプロセスを選択します。$ ps f | wc -l 224 $ ps -f -o pid | wc -l 224
ps -f
有無にかかわらず選択できるさまざまなプロセスがありますか-o
?$ ps -f | wc -l 5
-e
ここでは可能なようではないでしょうか?$ ps -e -f -o pid,ppid,comm | wc -l 224 $ ps -e -f | wc -l 414 $ ps -e -o pid,ppid,comm | wc -l 414
ありがとうございます。
ベストアンサー1
多くのps
Gnu / Linuxは、System VとBSDという2つ以上のバージョンと互換性がありますps
。いくつかのオプションは1つから出て、いくつかは別のオプションから来ます。