这个算Linux的重大bug还是本人操作失当?
Tofloor
poster avatar
xliang9550
deepin
2014-12-20 09:21
Author
在终端下使用rm删除的文件没有出现在回收站中。
当时执行了这样的命令:
  1. sudo rm -rf ./*
Copy the Code
结果清空了我的工作目录。
Reply Favorite View the author
All Replies
sudo2025
deepin
2014-12-20 10:01
#1
rm 的文件都是不会出现在回收站中的。。
Reply View the author
sudo2025
deepin
2014-12-20 10:02
#2
回收站其实是一个隐藏的文件夹,在Windows下也是这个逻辑
Reply View the author
aming
deepin
2014-12-20 15:33
#3
明显是操作失误了,你还-f。。。force啊,强制....
Reply View the author
jd808
deepin
2014-12-20 17:45
#4
删除命令最好加个用户确认,centos就是这样的
Reply View the author
136******54
deepin
2014-12-20 18:03
#5
还好加了个点
Reply View the author
firstar
deepin
2014-12-20 18:58
#6
还好加了个点
:
Reply View the author
Ldeepin
deepin
2014-12-20 19:57
#7
小伙子很不错!
Reply View the author
xliang9550
deepin
2014-12-21 00:13
#8
那么,将文件移动到回收站的命令是什么?难道是应该用mv?
Reply View the author
electricface
deepin
2014-12-21 01:10
#9
安装 软件包 trash-cli
sudo apt-get install trash-cli

删除文件到回收站
trash 文件名
Reply View the author
MattD
deepin
2014-12-21 01:13
#10
那么,将文件移动到回收站的命令是什么?难道是应该用mv?
装个trash-cli包,然后用trash命令删除文件。
Unix哲学是默认假定用户知道自己所做的每一步操作会导致的后果,你可以把rm做成rm -i的别名,以免手误。
Reply View the author
stephenjy
deepin
2014-12-21 02:23
#11
[quote]那么,将文件移动到回收站的命令是什么?难道是应该用mv?
装个trash-cli包,然后用trash命令删除文件。
Unix哲学是默认假定用户知道自己所做的每一步操作会导致的后果,你可以把rm做成rm -i的别名,以免手误。[/quote]

alias成 rm -i没用的,他敲命令时带了 -f 参数,-i就直接被忽略了。
Reply View the author
xliang9550
deepin
2014-12-22 07:48
#12
我直接把rm做成trash的alias。
就像刚开始接触MATE的时候,把gedit做成了pluma的alias……
Reply View the author
Lotuso
deepin
2014-12-23 09:07
#13
如此神命令不敢用啊
Reply View the author