当前位置: 首页 > 编程日记 > 正文

trash-cli设置Linux 回收站

trash-cli 设置 Linux 回收站

trash-cli是一个使用 python 开发的软件包,包含 trash-put、restore-trash、trash-list、trash-empty、trash-rm等命令,我们可以通过这条命令,将文件移动到回收站,或者还原删除了的文件。

trash-cli的项目地址:https://github.com/andreafrancia/trash-cli

系统:CentOS 6.8

  • 安装
下载地址:https://github.com/andreafrancia/trash-cli
cd /tmp
unzip trash-cli-master.zip
cd trash-cli-master
python setup.py install

安装过程

[root@node1 trash-cli-0.17.1.14]# python setup.py install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/trashcli
copying trashcli/trash.py -> build/lib/trashcli
copying trashcli/list.py -> build/lib/trashcli
copying trashcli/empty.py -> build/lib/trashcli
copying trashcli/list_mount_points.py -> build/lib/trashcli
copying trashcli/rm.py -> build/lib/trashcli
copying trashcli/__init__.py -> build/lib/trashcli
copying trashcli/put.py -> build/lib/trashcli
copying trashcli/fstab.py -> build/lib/trashcli
copying trashcli/restore.py -> build/lib/trashcli
copying trashcli/fs.py -> build/lib/trashcli
copying trashcli/cmds.py -> build/lib/trashcli
running build_scripts
creating build/scripts-2.6
copying and adjusting trash -> build/scripts-2.6
copying and adjusting trash-put -> build/scripts-2.6
copying and adjusting trash-list -> build/scripts-2.6
copying and adjusting trash-restore -> build/scripts-2.6
copying and adjusting trash-empty -> build/scripts-2.6
copying and adjusting trash-rm -> build/scripts-2.6
changing mode of build/scripts-2.6/trash from 644 to 755
changing mode of build/scripts-2.6/trash-put from 644 to 755
changing mode of build/scripts-2.6/trash-list from 644 to 755
changing mode of build/scripts-2.6/trash-restore from 644 to 755
changing mode of build/scripts-2.6/trash-empty from 644 to 755
changing mode of build/scripts-2.6/trash-rm from 644 to 755
running install_lib
creating /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/trash.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/list.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/empty.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/list_mount_points.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/rm.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/__init__.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/put.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/fstab.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/restore.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/fs.py -> /usr/lib/python2.6/site-packages/trashcli
copying build/lib/trashcli/cmds.py -> /usr/lib/python2.6/site-packages/trashcli
byte-compiling /usr/lib/python2.6/site-packages/trashcli/trash.py to trash.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/list.py to list.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/empty.py to empty.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/list_mount_points.py to list_mount_points.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/rm.py to rm.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/put.py to put.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/fstab.py to fstab.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/restore.py to restore.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/fs.py to fs.pyc
byte-compiling /usr/lib/python2.6/site-packages/trashcli/cmds.py to cmds.pyc
running install_scripts
copying build/scripts-2.6/trash-rm -> /usr/bin
copying build/scripts-2.6/trash-list -> /usr/bin
copying build/scripts-2.6/trash-put -> /usr/bin
copying build/scripts-2.6/trash -> /usr/bin
copying build/scripts-2.6/trash-restore -> /usr/bin
copying build/scripts-2.6/trash-empty -> /usr/bin
changing mode of /usr/bin/trash-rm to 755
changing mode of /usr/bin/trash-list to 755
changing mode of /usr/bin/trash-put to 755
changing mode of /usr/bin/trash to 755
changing mode of /usr/bin/trash-restore to 755
changing mode of /usr/bin/trash-empty to 755
running install_data
copying man/man1/trash-empty.1 -> /usr/share/man/man1
copying man/man1/trash-list.1 -> /usr/share/man/man1
copying man/man1/trash-restore.1 -> /usr/share/man/man1
copying man/man1/trash-put.1 -> /usr/share/man/man1
copying man/man1/trash-rm.1 -> /usr/share/man/man1
running install_egg_info
Writing /usr/lib/python2.6/site-packages/trash_cli-0.17.1.14-py2.6.egg-info
[root@node1 trash-cli-0.17.1.14]#
  • 安装成功后我们的系统就有了以下工具.
[root@node1 ~]# ll /usr/bin/|grep trash
-rwxr-xr-x    1 root root        123 2月  18 15:26 trash
-rwxr-xr-x    1 root root        125 2月  18 15:26 trash-empty
-rwxr-xr-x    1 root root        124 2月  18 15:26 trash-list
-rwxr-xr-x    1 root root        123 2月  18 15:26 trash-put
-rwxr-xr-x    1 root root        127 2月  18 15:26 trash-restore
-rwxr-xr-x    1 root root        122 2月  18 15:26 trash-rm
[root@node1 ~]#
  • 功能说明
命令概览:trash-put          将文件或目录移入回收站trash-empty        清空回收站trash-list         列出回收站中的文件trash-restore      还原回收站中的文件trash-rm           删除回首站中的单个文件
  • 用它替代 rm命令
[root@node1 ~]# vim /etc/.bashrc
# 添加下面一行
alias rm=”trush-put”

使修改的别名生效:

[root@node1 ~]# source /etc/bashrc

默认存放路径:/~/.local/share/Trash/files/

转载于:https://blog.51cto.com/moerjinrong/2351347

相关文章:

磁盘有时也不可靠

实验服务器的磁盘是最近买的,当卖家问我要普通的还是高级的, 我选择了普通,现在追悔莫及。今天的分析更加详细。首先发现每次实验,出错的文件都不一样,所以应该不是临界条件的问题。下表总结了出错的位置,原…

从原理到落地,七大维度详解矩阵分解推荐算法

作者 | gongyouliu编辑丨Zandy来源 | 大数据与人工智能 ( ID: ai-big-data)导语:作者在《协同过滤推荐算法》这篇文章中介绍了 user-based 和 item-based 协同过滤算法,这类协同过滤算法是基于邻域的算法(也称为基于内存的协同过…

libyuv库的使用

libyuv是Google开源的实现各种YUV与RGB之间相互转换、旋转、缩放的库。它是跨平台的,可在Windows、Linux、Mac、Android等操作系统,x86、x64、arm架构上进行编译运行,支持SSE、AVX、NEON等SIMD指令加速。下面说一下libyuv在Windows7VS2013 x6…

封装 vue 组件的过程记录

在我们使用vue的开发过程中总会遇到这样的场景,封装自己的业务组件。 封装页面组件前要考虑几个问题:1、该业务组件的使用场景 2、在什么条件下展示一些什么数据,数据类型是什么样的,及长度颜色等 3、如果是通用的内容&#xff0c…

Service的基本组成

Service与Activity的最大区别就是一有界面,一个没有界面。 如果某些程序操作很消耗时间,那么可以将这些程序定义在Service之中,这样就可以完成程序的后台运行, 其实Service就是一个没有界面的Activity,执行跨进程访问也…

BP神经网络公式推导及实现(MNIST)

BP神经网络的基础介绍见:http://blog.csdn.net/fengbingchun/article/details/50274471,这里主要以公式推导为主。BP神经网络又称为误差反向传播网络,其结构如下图。这种网络实质是一种前向无反馈网络,具有结构清晰、易实现、计算…

AI应用落地哪家强?CSDN AI Top 30+案例评选等你来秀!

人工智能历经百年发展,如今迎来发展的黄金时期。目前,AI 技术已涵盖自然语言处理、模式识别、图像识别、数据挖掘、机器学习等领域的研究,在汽车、金融、教育、医疗、安防、零售、家居、文娱、工业等行业获得了令人印象深刻的成果。 在各行业…

安利Mastodon:属于未来的社交网络

我为Mastodon开发了一款安卓客户端,v1.0版本已经发布,欢迎下载使用 源码在这里:https://github.com/shuiRong/Gakki ??? 正文 Mastodon(长毛象)是什么? 是一个免费开源、去中心化、分布式的微博客社交网络,是微博、…

通过案例练习掌握SSH 的整合

1. SSH整合_方案01 ** 整合方案01 Struts2框架 Spring框架 在Spring框架中整合了Hibernate(JDBC亦可) 一些业务组件(Service组件)也可以放入Spring框架中迚行管理(昨天的例子) 1. 请求&#xff0…

tiny-cnn开源库的使用(MNIST)

tiny-cnn是一个基于CNN的开源库,它的License是BSD 3-Clause。作者也一直在维护更新,对进一步掌握CNN很有帮助,因此下面介绍下tiny-cnn在windows7 64bit vs2013的编译及使用。 1. 从https://github.com/nyanp/tiny-cnn下载源码&#xff1…

玩嗨的2亿快手“老铁”和幕后的极致视觉算法

作者 | Just出品 | AI科技大本营(ID:rgznai100)创立八年,短视频平台快手目前已经有超过两亿人在每天登陆使用,每天还有超过 1500 万条短视频被制作和上传,每天的累计观看数更是达到 150 亿。拥有如此庞大的用户数&…

lsmod命令详解

基础命令学习目录首页 原文链接:http://blog.sina.com.cn/s/blog_e6b2465d0101fuev.html lsmod——显示已载入系统的模块 lsmod 其实就是list modules的缩写,即 列出所有模块. 功能说明:显示已载入系统的模块。 语法:lsmod 说明&a…

javascript模块化、模块加载器初探

最常见网站的javascript架构可能是这样的: 一个底层框架文件,如jQuery一个网站业务框架文件,包含整站公用业务模块类(如弹框、ajax封装等)多个业务文件,包含每个具体页面有关系的业务代码为了减少一个HTTP请求,我们可能…

tiny-cnn执行过程分析(MNIST)

在http://blog.csdn.net/fengbingchun/article/details/50573841中以MNIST为例对tiny-cnn的使用进行了介绍,下面对其执行过程进行分析:支持两种损失函数:(1)、mean squared error(均方差);(2)、cross entropy(交叉熵)。在MNIST中使…

关于element的select多选选择器,数据回显的问题

关于element的select多选,数据回显的问题 在工作中遇到这样一个问题,新建表单时用element的select多选以后,在编辑的时候打开表单发现其他数据能正常显示,多选却无法正常回显。在网上找了很多后,终于解决了这个问题&am…

360金融发布Q2财报:净利6.92亿,同比增长114%,大数据与AI加持的科技服务是新亮点?

8月23日,360金融发布未经审计的2019年第二季度业绩报告。财务数据显示,2019年第二季度,360金融实现收入22.27亿元人民币,较2018年二季度9.79亿元增长128%;净利润为6.18亿元,而去年同期为净亏损1.42亿元&…

SPRING3.X JSON 406 和 中文乱码问题

2019独角兽企业重金招聘Python工程师标准>>> 简要 最近使用Spring3.2.3 版本 在使用 JSON message convertion 的时候,老是出现406 返回类型不匹配的问题,去网上google 了一番 也没有一个明确的说法,只能自己去调试。 Maven 依…

VLFeat开源库介绍及在VS2013中的编译

VLFeat是一个开源的计算机视觉算法库,内容主要包括feature detectors、feature extractors、k-means clustering、randomized kd-tree matching、super-pixelization。它是跨平台的,能够应用在Linux、Mac、Windows平台。它的License是BSD。 在VS2013中编…

人工智能写手,好用吗?

作者 | 王树义来源 | 玉树芝兰(ID:nkwangshuyi)1、印象之前给学生上课的时候,我介绍过利用循环神经网络,仿照作家风格进行创作的机器学习模型。不过,那模型写出来的东西嘛……我的评价是:望之&a…

表单系列之input number总结

各浏览器表现 <input type"number" /> chrome 除数字字符&#xff0c;只可输入e和.IE 除数字字符&#xff0c;其他字符均可输入&#xff0c;无报错Firefox 除数字字符&#xff0c;其他字符均可输入&#xff0c;但会报错移除箭头 //谷歌去除箭头 input::-webki…

Android中Service深入学习

概述 1、当用户在与当前应用程序不同的应用程序时&#xff0c;Service可以继续在后台运行。 2、Service可以让其他组件绑定&#xff0c;以便和它交互并进行进程间通信。 3、Service默认运行在创建它的应用程序的主线程中。 Service的使用主要是因为应用程序里面可能需要长时间地…

卷积神经网络(CNN)的简单实现(MNIST)

卷积神经网络(CNN)的基础介绍见http://blog.csdn.net/fengbingchun/article/details/50529500&#xff0c;这里主要以代码实现为主。CNN是一个多层的神经网络&#xff0c;每层由多个二维平面组成&#xff0c;而每个平面由多个独立神经元组成。以MNIST作为数据库&#xff0c;仿照…

Tensorflow源码解析5 -- 图的边 - Tensor

1 概述 前文两篇文章分别讲解了TensorFlow核心对象Graph&#xff0c;和Graph的节点Operation。Graph另外一大成员&#xff0c;即为其边Tensor。边用来表示计算的数据&#xff0c;它经过上游节点计算后得到&#xff0c;然后传递给下游节点进行运算。本文讲解Graph的边Tensor&…

物联网成网络安全防护新重点!

在昨天的 2019 北京网络安全大会上&#xff0c;工信部负责人表示&#xff0c;我国面向 5G 和车联网将建设网安防护体系&#xff0c;提升监测预警和应急响应能力。其中物联网设备已成为网安防护新重点。为什么工信部会这么重视物联网&#xff1f;物联网开发者的现状又是如何呢&a…

【分享】Java的几个重要词语

Java 是一种解释型语言,由SUN公司开发,基本上属于一个完全面向对象的语言&#xff0c;并且语言的设计仍然以简捷为重点。初学Java肯定会被一些名词给弄晕了&#xff0c;现在集中几个解释一下下。1、JVMJVM是Java Virtual Machine&#xff08;Java虚拟机&#xff09;的缩写&…

64位Ubuntu上编译32位程序操作步骤

1. 确认主机为64位架构的内核&#xff0c;应该输出为adm64&#xff0c;执行&#xff1a;$ dpkg --print-architecture2. 确认打开了多架构支持功能&#xff0c;应该输出为i386&#xff0c;执行&#xff1a;$ dpkg --print-foreign-architectures如果没有&#xff0c;…

分布式事务中间件 Fescar—RM 模块源码解读

2019独角兽企业重金招聘Python工程师标准>>> 前言 在SOA、微服务架构流行的年代&#xff0c;许多复杂业务上需要支持多资源占用场景&#xff0c;而在分布式系统中因为某个资源不足而导致其它资源占用回滚的系统设计一直是个难点。我所在的团队也遇到了这个问题&…

二维码检测哪家强?五大开源库测评比较

作者 | 周强来源 | 我爱计算机视觉&#xff08;ID&#xff1a;aicvml&#xff09;二维码已经进入人们的日常生活中&#xff0c;尤其是日本Denso Wave公司1994年发明的QR码&#xff0c;由于其易于检测、写入信息量大、提供强大的纠错机制&#xff0c;应用最为广泛&#xff0c;可…

linux 内核 出错-HP 方案

2019独角兽企业重金招聘Python工程师标准>>> SUPPORT COMMUNICATION - CUSTOMER ADVISORY Document ID: c03456595 Version: 1 Advisory: Red Hat Enterprise Linux 6 - "P4-Clockmod: Warning: EST-Capable CPU Detected" Messages Logged in /var/log…

Windows7 64bit VS2013 Caffe test MNIST操作步骤

在http://blog.csdn.net/fengbingchun/article/details/49849225中用Caffe对MNIST数据库进行训练&#xff0c;产生了model。下面介绍下如何将产生的model应用在实际的数字图像识别中。用到的测试图像与http://blog.csdn.net/fengbingchun/article/details/50573841中相同&#…