abrt-cli——帮助

abrt-cli——帮助

我们尝试删除所有 abrt 文件夹,如下所示(在 redhat Linux 机器上)

find /var/spool/abrt/*  -type d   -exec abrt-cli rm '{}' \;
rm '/var/spool/abrt/ccpp-2018-09-03-14:52:11-5653'
rm '/var/spool/abrt/ccpp-2019-03-26-12:18:52-31410'
rm '/var/spool/abrt/ccpp-2019-04-07-05:50:25-16907'
rm '/var/spool/abrt/ccpp-2019-10-29-14:20:46-20059'


pwd
/var/spool/abrt

但我们仍然看到文件夹和文件夹内容

ls -ltr  /var/spool/abrt
total 24
-rw-------  1 root root   70 Nov  5 09:43 last-ccpp
-rw-------. 1 root root   48 Dec  9 03:25 last-via-server
drwx------  2 root root 4096 Dec  9 18:45 ccpp-2018-09-03-14:52:11-5653
drwx------  2 root root 4096 Dec  9 18:45 ccpp-2019-03-26-12:18:52-31410
drwx------  2 root root 4096 Dec  9 18:45 ccpp-2019-04-07-05:50:25-16907
drwx------  2 root root 4096 Dec  9 18:45 ccpp-2019-10-29-14:20:46-20059

为什么 abrt-cli rm不删除文件夹?

来自 abrt.conf

grep -v "^#" /etc/abrt/abrt.conf

MaxCrashReportsSize = 1000
DeleteUploaded = no
AutoreportingEvent = report_uReport
AutoreportingEnabled = no
PrivateReports = yes

答案1

使用 abrt-cli 命令:

abrt-cli rm 目录

这是帮助页面:

abrt-cli——帮助

用法:abrt-cli [--authenticate] [--version] 命令 [DIR]...

list, ls      List problems [in DIRs]
remove, rm    Remove problem directory DIR
report, e     Analyze and report problem data in DIR
info, i       Print information about DIR
status, st    Print the count of the recent crashes
process, p    Process multiple problems

请参阅“abrt-cli COMMAND --help”以了解更多信息

相关内容