首页 > 系统服务 > 详细

Linux(Ubuntu)使用日记------trash-cli防止误删文件

时间:2018-03-05 14:25:50      阅读:227      评论:0      收藏:0      [点我收藏+]

1.安装过程

cd /tmp

git clone https://github.com/andreafrancia/trash-cli

cd trash-cli

sudo python setup.py install

2.检验

安装完成之后我们系统就拥有了下列工具

?  ~  ll /usr/bin/|grep trash

-rwxr-xr-x  1 root root    123  5月 28 19:38 trash

-rwxr-xr-x  1 root root    125  5月 28 19:38 trash-empty

-rwxr-xr-x  1 root root    124  5月 28 19:38 trash-list

-rwxr-xr-x  1 root root    123  5月 28 19:38 trash-put

-rwxr-xr-x  1 root root    127  5月 28 19:38 trash-restore

-rwxr-xr-x  1 root root    122  5月 28 19:38 trash-rm

3.功能说明:

trash == trash-put == 删除

trash-empty 清空

trash-list 列出回收站

trash-restore 恢复文件

trash-rm  删除回收站中指定文件

4.配置

alias rm=‘echo " This is not the command you are looking for.If you really want use rm simply prepend a slash"; false‘ 

 

Linux(Ubuntu)使用日记------trash-cli防止误删文件

原文:https://www.cnblogs.com/hwtblog/p/8508747.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!