gpt4 book ai didi

linux - Linux命令 `args`中的 `ps ao args`到底是什么意思?

转载 作者:太空宇宙 更新时间:2023-11-04 05:59:50 24 4
gpt4 key购买 nike

ps 的手册页中,我发现-a意思是:

Select all processes except both session leaders (see getsid(2)) and processes not associated with a terminal.

-o意思是

User-defined format. format is a single argument in the form of a blank-separated or comma-separated list, which offers a way to specify individual output columns. The recognized keywords are described in the STANDARD FORMAT SPECIFIERS section below. Headers may be renamed (ps -o pid,ruser=RealUser -o comm=Command) as desired. If all column headers are empty (ps -o pid=-o comm=) then the header line will not be output. Column width will increase as needed for wide headers; this may be used to widen up columns such as WCHAN (ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm). Explicit width control (ps opid,wchan:42,cmd) is offered too. The behavior of ps -o pid=X,comm=Y varies with personality; output may be one column named "X,comm=Y" or two columns named "X" and "Y". Use multiple -o options when in doubt. Use the PS_FORMAT environment variable to specify a default as desired; DefSysV and DefBSD are macros that may be used to choose the default UNIX or BSD columns.

但是args有什么作用?在此命令中意味着什么?

注意args不是其他任何内容的占位符,只有 4 个字符:a + r + g + s

最佳答案

args-o 标志的选项之一,意思是“将命令及其所有参数显示为字符串。来自 man page :

   args        COMMAND   command with all its arguments as a string.
Modifications to the arguments may be shown.
The output in this column may contain spaces.
A process marked <defunct> is partly dead,
waiting to be fully destroyed by its parent.
Sometimes the process args will be unavailable;
when this happens, ps will instead print the
executable name in brackets. ...

关于linux - Linux命令 `args`中的 `ps ao args`到底是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50102505/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com