trash-cli
trash-cli copied to clipboard
trash-put: block 'trash-put /*' (was 无法阻止命令rm -rf /* 删除根目录)
[root@myserver files]# which rm alias rm='trash' /usr/bin/trash [root@myserver rfiles]# rm -rf /* trash: cannot trash directory '/boot'
Running rm-rf / directly allows you to delete some system files, and you cannot use trash-restore after the deletion 直接执行 rm -rf /是可以删除部分系统文件的,而且删除后无法使用trash-restore恢复
[root@myserver files]# trash-restore
Traceback (most recent call last):
File "/usr/bin/trash-restore", line 5, in
trash中删除文件的命令是 trash-put吧。我不知道trash命令的作用。
Trash-Cli dependent libraries are deleted after rm -rf /*
Please do not use trash-cli for deleting system folders using the root user
yes I can't put it better
------------------ 原始邮件 ------------------ 发件人: "andreafrancia/trash-cli" <[email protected]>; 发送时间: 2020年12月12日(星期六) 凌晨4:36 收件人: "andreafrancia/trash-cli"<[email protected]>; 抄送: "啊!我不会一个人"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [andreafrancia/trash-cli] 无法阻止命令rm -rf /* 删除根目录 (#167)
Please do not use trash-cli for deleting system folders using the root user
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
What @YJiWei saying is,
some barrier should be equipped, such as --no-preserve-root
for rm -rf /
,
isn't it?
Without the alias setting, though,
if trash-put ./*
is mistyped, ... dear! X(
Why would you alias rm to trash? You will break every script that uses rm.