Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计通过

trash-clitrash CLI 搜索

Agent Skill

trash-cli 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

15,587

周安装

656

GitHub Stars

公开资料未说明

下载量

5,458
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:trash-cli(trash CLI 搜索)
来源仓库:https://github.com/xlionjuan/trash-cli
安装命令:
openclaw skills install trash-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install trash-cli

简介

安全删除文件至系统垃圾箱,防止误删导致数据丢失。

  • 支持恢复已移动文件,提升文件管理安全性。trash-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 当用户需要替代 rm 命令时可调用此技能。
  • 安装前建议确认系统兼容性和回收站路径配置。
  • 可结合原始文档了解支持的操作系统和恢复机制。

SKILL.md

name
trash-cli
version
1.0.5
description
Use trash-cli to safely delete files by moving them to the system trash instead of permanently removing them. This prevents accidental data loss and allows file recovery. Use instead of rm when you want recoverable deletion.
metadata

trash-cli

A command line interface to the freedesktop.org trashcan. It trashes files recording the original path, deletion date, and permissions. It uses the same trashcan used by KDE, GNOME, and XFCE.

Installation

# Via Homebrew (Linux/macOS)
brew install trash-cli

# Via pip
pip install trash-cli

# Via apt (Debian/Ubuntu)
sudo apt install trash-cli

# Via pacman (Arch Linux)
sudo pacman -S trash-cli

# Via dnf (Fedora)
sudo dnf install trash-cli

Commands Overview

CommandDescription
trash-putMove files/directories to trash
trash-listList trashed files
trash-restoreRestore trashed files
trash-emptyPermanently delete trashed files
trash-rmRemove specific files from trash

trash-put

Move files or directories to the trash can.

trash-put <file>           # Trash a file
trash-put <dir>/           # Trash a directory
trash-put -f <file>        # Silently ignore nonexistent files
trash-put -v <file>        # Verbose output

Options

  • -f, --force - Silently ignore nonexistent files
  • -v, --verbose - Explain what is being done
  • --trash-dir TRASHDIR - Use TRASHDIR as trash folder

Notes

  • Unlike rm, trash-put does not require -R for directories
  • Files trashed from home partition go to ~/.local/share/Trash/
  • Files from other partitions go to $partition/.Trash/$uid or $partition/.Trash-$uid

trash-list

List all trashed files.

trash-list                          # List all trashed files
trash-list | grep <pattern>         # Search for specific files
trash-list --all-users              # List trashcans of all users

Output Format

2008-06-01 10:30:48 /home/user/bar
2008-06-02 21:50:41 /home/user/baz

Format: deletion_date original_path

trash-restore

Restore trashed files to their original location.

trash-restore                       # Interactive restore
trash-restore --overwrite          # Overwrite existing files
trash-restore --sort date          # Sort by date (default)
trash-restore --sort path          # Sort by path

Interactive Mode

$ 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/baz
What file to restore [0..2]: 0
  • Enter the number to restore that file
  • Use 0-2,3 to restore multiple files
  • Use --overwrite to replace existing files

trash-empty

Permanently remove files from trash.

trash-empty                 # Remove ALL trashed files
trash-empty 7              # Remove files older than 7 days
trash-empty 1              # Remove files older than 1 day

Examples

# Delete everything in trash
trash-empty

# Keep only files from the last 7 days
trash-empty 7

# Keep only today's files
trash-empty 1

trash-rm

Remove specific files from trash (by pattern).

trash-rm <pattern>         # Remove files matching pattern
trash-rm '*.o'             # Remove all .o files
trash-rm foo               # Remove all files named "foo"
trash-rm /full/path        # Remove by original path

Note: Use quotes to protect pattern from shell expansion.

trash-rm '*.log'          # Correct
trash-rm *.log            # Wrong - shell will expand

Safety Tips

Replace rm with trash-put

Add to .bashrc or .zshrc:

# Remind yourself not to use rm directly
alias rm='echo "Use trash-put instead!"; false'

# Or use a safer alias
alias rm='trash-put'

To bypass the alias when you really need rm:

\
m file.txt

Recovery Workflow

  1. Check what's in trash: trash-list
  2. Find your file: trash-list | grep <filename>
  3. Restore: trash-restore

Trash Location

  • Home partition: ~/.local/share/Trash/
  • Other partitions: $mount_point/.Trash/$uid or $mount_point/.Trash-$uid

Limitations

  • Does not support BRTFS volumes
  • Cannot trash files from read-only filesystems

FAQ

Creating a top-level .Trash directory

If you need to create a trash directory on a different partition:

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

Should I alias rm to trash-put?

The author advises against this. Although trash-put seems compatible with rm, it has different semantics that will cause problems. For example, while rm requires -R for deleting directories, trash-put does not.

Instead, use a warning alias:

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

To bypass when you really need rm:

\
m file.txt

See Also

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.29%
按下载量换算4,819

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install trash-cli 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills