2025-10-17    2025-10-17    97 字  1 分钟
  • linux上的垃圾桶: trash-cli
    1. 安装
      sudo apt install trash-cli
      或
      pip install trash-cli
      
    2. 取消"rm":
      alias rm='echo "
      ⚠️  This is not the command you are looking for.
      
      👉  Please use trash-cli instead. It is safer and provides these commands:
      
         trash-put / trash      →  Move files/directories to trash
         trash-empty    →  Empty the trashcan(s)
         trash-list     →  List trashed files
         trash-restore  →  Restore a trashed file
         trash-rm       →  Remove individual files from trash
      "'