SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

trash-cli rpm build for : openSUSE Leap 15. For other distributions click trash-cli.

Name : trash-cli
Version : 0.17.1.14 Vendor : obs://build_opensuse_org/home:cornfeedhobo
Release : lp150.1.1 Date : 2018-11-09 20:00:13
Group : Development/Languages/Python Source RPM : trash-cli-0.17.1.14-lp150.1.1.src.rpm
Size : 0.16 MB
Packager : (none)
Summary : Command line interface to FreeDesktop.org Trash
Description :
trash-cli - Command Line Interface to FreeDesktop.org Trash.
============================================================

trash-cli trashes files recording the original path, deletion date, and
permissions. It uses the same trashcan used by KDE, GNOME, and XFCE, but you
can invoke it from the command line (and scripts).

It provides these commands::

trash-put trash files and directories.
trash-empty empty the trashcan(s).
trash-list list trashed files.
trash-restore restore a trashed file.
trash-rm remove individual files from the trashcan.

Usage
-----

Trash a file::

$ trash-put foo

List trashed files::

$ trash-list
2008-06-01 10:30:48 /home/andrea/bar
2008-06-02 21:50:41 /home/andrea/bar
2008-06-23 21:50:49 /home/andrea/foo

Search for a file in the trashcan::

$ trash-list | grep foo
2007-08-30 12:36:00 /home/andrea/foo
2007-08-30 12:39:41 /home/andrea/foo

Restore a trashed file::

$ trash-restore
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
4 2007-08-30 12:39:41 /home/andrea/foo
What file to restore [0..4]: 4
$ ls foo
foo

Remove all files from the trashcan::

$ trash-empty

Remove only the files that have been deleted more than < days> ago::

$ trash-empty < days>

Example::

$ date
Tue Feb 19 20:26:52 CET 2008
$ trash-list
2008-02-19 20:11:34 /home/einar/today
2008-02-18 20:11:34 /home/einar/yesterday
2008-02-10 20:11:34 /home/einar/last_week
$ trash-empty 7
$ trash-list
2008-02-19 20:11:34 /home/einar/today
2008-02-18 20:11:34 /home/einar/yesterday
$ trash-empty 1
$ trash-list
2008-02-19 20:11:34 /home/einar/today

Remove only files matching a pattern::

$ trash-rm \\*.o

Note: you need to use quotes in order to protect the pattern from shell expansion.

FAQ
---

How to create a top level .Trash dir?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Steps ::

sudo mkdir --parent /.Trash
sudo chmod a+rw /.Trash
sudo chmod +t /.Trash

Can I alias `rm` to `trash-put`?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can but you shouldn\'t. In the early days I thought it was a good idea to do
that but now I changed my mind.

Although rhe interface of `trash-put` seems to be compatible with `rm`, it has
different semantics which will cause you problems. For example, while `rm`
requires `-R` for deleting directories `trash-put` does not.

But sometimes I forget to use `trash-put`, really can\'t I?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You could alias `rm` to something that will remind you to not use it::

alias rm=\'echo \"This is not the command you are looking for.\"; false\'

Then, if you really want to use `rm`, simply prepend a slash to bypass the alias::

\\rm file-without-hope

Note that Bash aliases are used only in interactive shells, so using
this alias should not interfere with scripts that expect to use `rm`.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/home:/cornfeedhobo/openSUSE_Leap_15.0/noarch

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
trash-cli

Requires :
/usr/bin/python
python(abi) = 2.7
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/bin/trash
/usr/bin/trash-empty
/usr/bin/trash-list
/usr/bin/trash-put
/usr/bin/trash-restore
/usr/bin/trash-rm
/usr/lib/python2.7/site-packages/trash_cli-0.17.1.14-py2.7.egg-info
/usr/lib/python2.7/site-packages/trashcli
/usr/lib/python2.7/site-packages/trashcli/__init__.py
/usr/lib/python2.7/site-packages/trashcli/__init__.pyc
/usr/lib/python2.7/site-packages/trashcli/cmds.py
/usr/lib/python2.7/site-packages/trashcli/cmds.pyc
/usr/lib/python2.7/site-packages/trashcli/empty.py
/usr/lib/python2.7/site-packages/trashcli/empty.pyc
/usr/lib/python2.7/site-packages/trashcli/fs.py
/usr/lib/python2.7/site-packages/trashcli/fs.pyc
/usr/lib/python2.7/site-packages/trashcli/fstab.py
/usr/lib/python2.7/site-packages/trashcli/fstab.pyc
/usr/lib/python2.7/site-packages/trashcli/list.py
/usr/lib/python2.7/site-packages/trashcli/list.pyc
/usr/lib/python2.7/site-packages/trashcli/list_mount_points.py
/usr/lib/python2.7/site-packages/trashcli/list_mount_points.pyc
/usr/lib/python2.7/site-packages/trashcli/put.py
/usr/lib/python2.7/site-packages/trashcli/put.pyc
/usr/lib/python2.7/site-packages/trashcli/restore.py
/usr/lib/python2.7/site-packages/trashcli/restore.pyc
/usr/lib/python2.7/site-packages/trashcli/rm.py
/usr/lib/python2.7/site-packages/trashcli/rm.pyc
/usr/lib/python2.7/site-packages/trashcli/trash.py
/usr/lib/python2.7/site-packages/trashcli/trash.pyc
There is 8 files more in these RPM.

 
ICM