關於linux sudo命令的問題?

時間 2021-10-26 13:04:57

1樓:長軍

在這個使用者下執行

alias

可能sudo 命令被修改了,每次執行都會在後台執行logger,儲存使用記錄。

另外我的系統內的 logger沒有-r 選項,應該是報錯的原因。

$ logger --help

Usage:

logger [options]

Enter messages into the system log.

Options:

-ilog the logger command's PID

--id[=log the given , or otherwise the PID

-f, --file log the contents of this file

-e, --skip-empty do not log empty lines when processing files

--no-actdo everything except the write the log

-p, --priority mark given message with this priority

--octet-count use rfc6587 octet counting

--prio-prefix look for a prefix on every line read from stdin

-s, --stderroutput message to standard error as well

-S, --size maximum size for a single message

-t, --tag mark every line with this tag

-n, --server write to this remote syslog server

-P, --port use this port for UDP or TCP connection

-T, --tcpuse TCP only

-d, --udpuse UDP only

--rfc3164use the obsolete BSD syslog protocol

--rfc5424[=] use the syslog protocol (the default for remotelt;snip> can be notime, or notq, and/or nohost

--sd-id rfc5424 structured data ID

--sd-param rfc5424 structured data name=value

--msgid set rfc5424 message id field

-u, --socket write to this Unix socket

--socket-errors[=print connection errors when using Unix sockets

--journald[=] write journald entry

-h, --help display this help and exit

-V, --version output version information and exit

For more details see logger(1).

2樓:黃承開

提示很清楚啊,不是寫了invalid option -- 'r'嗎?說明你的輸入中有正確的也有錯誤的引數。所以列印出來完整的用法(Usage)。

我懷疑你的sudo程式中或者被軟鏈到額外的logger程式(不太了解是個啥程式),你可以查一下。

使用top命令,free命令看到的記憶體占用和實際占用為什麼不符合,看到不是真實的?

南盼 很正常,top命令對程序資源的統計方式有問題。如下圖,是在一台32核128G記憶體伺服器上擷取的資料。可以看到我的樣例程式a.out的cpu使用率為1001 記憶體使用率為152 這是因為我的程式是乙個16執行緒的程式,且每個執行緒都對同乙個大約12G的共享記憶體進行了對映。可以看出,top在...

求問deep learning書中關於RNN反向傳播計算梯度的公式10 20和10 21?

lixing 10.21是錯的,在最新版的書中已經更正了。diag應該在W T和delta h t 1 L中間,大家參考一下這個資料,就會推了,大概可能要學習一兩天。我從接觸rnn到弄懂這一步,過去了三年,不禁感嘆如果當初沒有急功近利,慢慢學早就會推了吧。欲速則不達,見小利則大事不成。另外補充一句,...

關於come over前面為何不加to的問?

小千 語法小白強答,以下無責任瞎猜 從口語的角度來說,一般你改後的情況用的賓語是人,在例句裡,my apartment是物。比如說 翻譯我奶奶給我買了些糖吃。原句 My grandma bought some candies for me.因為這個句子裡的me是指人,所以也可以說 My grandm...