偶然看到一个比较好用的工具Trash-Cli。一个类似垃圾桶的机制,可以恢复文件。试了一下,感觉还行
(1)下载安装:
https://github.com/andreafrancia/trash-cli
[[email protected] ~]# yum install git -y #安装git [[email protected] ~]#git clone https://github.com/andreafrancia/trash-cli.git #git克隆岛本地 [[email protected] ~]#cd trash-cli [[email protected] trash-cli]#sudo python setup.py install #开始安装
(2)使用方法:
[[email protected] ~]# trash #可以看到有不少命令。trash-empty清空垃圾桶 trash-list查看垃圾桶文件 trash-put移入垃圾桶 trash-restore恢复垃圾桶文件 trash-rm移出垃圾桶文件 trash trash-empty trash-list trash-put trash-restore trash-rm [[email protected] ~]# trash-put trash-cli/ [[email protected] ~]# ls anaconda-ks.cfg [[email protected] ~]# trash-list 2019-12-07 17:02:47 /etc/yum.repos.d/docker-ce.repo 2019-12-07 17:10:11 /root/trash-cli [[email protected] ~]#
原文地址:https://www.cnblogs.com/biaopei/p/12002600.html
时间: 2024-10-28 06:35:12