Điểm qua andreafrancia/trash-cli: 4.5k sao trên GitHub, viết chủ yếu bằng Python, thuộc nhóm Backend. Command line interface to the freedesktop.org trashcan.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
trash-cli - Command Line Interface to FreeDesktop.org Trash
|Downloads|
|Donate|_
简体中文_
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.
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 the 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 backslash 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.
Where do the trashed files go?
File trashed from the home partition will be moved here::
~/.local/share/Trash/
How to auto delete files older than 30 days?
This will update your crontab file with a trash-empty command that runs daily
and removes files older than 30 days. To review your crontab use: crontab -l
Installation
The easy way
Requirements:
* Python 3 (Python 2.7 also works)
* pipx_ (optional, to install in a clean environment)
If pipx is available::
pipx install trash-cli
Alternatively, install with vanilla pip::
pip install trash-cli
Note: you may want to add ~/.local/bin to the PATH::
echo 'export PATH="$PATH":~/.local/bin' >> ~/.bashrc
source ~/.bashrc # reload .bashrc
For uninstalling use::
pipx uninstall trash-cli
or::
pip uninstall trash-cli
Bleeding Edge (from sources)
First of all you need to uninstall any previous version of trash-cli::
$ [sudo] pip uninstall trash-cli # remove the previous version (with pip)
$ [sudo] apt-get remove trash-cli # remove the previous version (with apt)
$ [sudo] yum uninstall trash-cli # remove the previous version (with yum)
$ ... # refer to the package manager of your distribution
andreafrancia/trash-cli có 4.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/andreafrancia/trash-cli. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
andreafrancia/trash-cli có phải mã nguồn mở không?
Có — andreafrancia/trash-cli phát hành theo license GPL-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/andreafrancia/trash-cli.
andreafrancia/trash-cli còn đang phát triển không?
Commit gần nhất trên andreafrancia/trash-cli là 15 ngày trước (theo timestamp GitHub). Repo có 207 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
andreafrancia/trash-cli dùng license gì?
andreafrancia/trash-cli phát hành theo license GPL-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
andreafrancia/trash-cli là gì?
andreafrancia/trash-cli (andreafrancia/trash-cli) là dự án Python trên GitHub. Theo mô tả gốc: Command line interface to the freedesktop.org trashcan.
andreafrancia/trash-cli viết bằng ngôn ngữ gì?
andreafrancia/trash-cli chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Cùng nhóm Backend còn repo nào?
andreafrancia/trash-cli thuộc nhóm Backend trên TopGit, cùng 3 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về andreafrancia/trash-cli ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/andreafrancia/trash-cli là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
trash-cli có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về trash-cli.