#cleanup #command-line

bin+lib putzen-cli

帮助安全地清理磁盘上的构建和依赖项存档

8 个稳定版本

1.0.8 2024年7月15日
1.0.7 2023年1月21日
1.0.6 2022年12月26日
1.0.4 2022年5月26日
1.0.1 2022年1月31日

558命令行工具

Download history 8/week @ 2024-06-29 110/week @ 2024-07-13 10/week @ 2024-07-20 45/week @ 2024-07-27

173 每月下载量

GPL-3.0-only

25KB
387 代码行

Putzen

License: GPL v3 crates.io dependency status Build Status LOC

"putzen" 是德语,意为清洁。它帮助安全地清理磁盘上的构建和依赖项存档。

demo

关于

简而言之,putzen 解决了清理构建或依赖项存档的问题。它通过简单的 "文件" -> "文件夹" 规则来实现。如果存在 "文件" 和 "文件夹",则清理 "文件夹"。

它还以快速的方式执行所有这些,即在并行(如果文件系统支持的话)。

支持的存档

putzen 支持清理以下类型的存档:

类型 被检查的文件 被清理的文件夹
rust Cargo.toml target
javascript package.json node_modules
CMake CMakeLists.txt build

此外,它还支持

  • 它可以执行干运行(-d
  • 交互式询问删除
  • 总结将要释放的空间

快速入门

安装

在 Linux 上作为 snap

Get it from the Snap Store

TL;DR

sudo snap install putzen

使用 cargo

要安装 putzen,您只需运行

cargo install putzen-cli

注意 二进制文件名为 putzen(没有 -cli

要验证安装是否成功,您可以运行 which putzen,输出应类似以下内容:

$HOME/.cargo/bin/putzen

用法

$ putzen --help

Usage: putzen <folder> [-v] [-d] [-y] [-L] [-a]

help keeping your disk clean of build and dependency artifacts

Positional Arguments:
  folder            path where to start with disk clean up.

Options:
  -v, --version     show the version number
  -d, --dry-run     dry-run will never delete anything, good for simulations
  -y, --yes-to-all  switch to say yes to all questions
  -L, --follow      follow symbolic links
  -a, --dive-into-hidden-folders
                    dive into hidden folders too, e.g. `.git`
  --help            display usage information

其他项目

许可证

依赖项

~2–10MB
~97K SLoC