【发布时间】:2021-06-22 07:39:45
【问题描述】:
执行命令
ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%mem | head
我明白了:
PID PPID %MEM %CPU CMD 1555 1 4.2 0.2 /usr/sbin/mysqld 2989 2735 3.9 4.0 /usr/bin/gnome-shell 4785 2735 3.8 3.3 /opt/google/chrome/chrome 5053 4803 3.6 1.4 /opt/google/chrome/chrome --type=renderer --field-trial-handle=14183456324498441308,5334468187998544589,131072 --lang=en-GB --enable-crash-reporter=e482c1e6-5c57-40e8 -bb27-910eab6576d7, --extension-process --origin-trial-disabled-features=SecurePaymentConfirmation --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=12 --no-v8-untrusted-code-mitigations --shared-files=v8_context_snapshot_data:100 5054 4803 3.5 0.6 /opt/google/chrome/chrome --type=renderer --field-trial-handle=14183456324498441308,5334468187998544589,131072 --lang=en-GB --enable-crash-reporter=e482c1e6-5c57-40e8 -bb27-910eab6576d7, --extension-process --origin-trial-disabled-features=SecurePaymentConfirmation --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=13 --no-v8-untrusted-code-mitigations --shared-files=v8_context_snapshot_data:100
在上面的输出中,我只想看到 chrome 或 opt/google/chrome/chrome 而不是完整的名称。
【问题讨论】: