爱意满满的作品展示区。
twfb

写了个 Linux 上的垃圾回收站, 类似 windows

  •  
  •   twfb · May 28, 2021 · 2289 views
    This topic created in 1821 days ago, the information mentioned may be changed or developed.

    个人用了挺长时间, 感觉还不错.

    项目链接: https://github.com/twfb/recycle

    Supplement 1  ·  Mar 10, 2022

    截屏

    asciicast

    用法

    • 将文件移动到回收站: del file_path
    • 将文件从回收站恢复: undel file_path or undel trash_path
    • 永久删除垃圾文件: pdel trash_file
    • 打印回收站文件树: tt
    • 打印回收站文件树调用less显示: tl
    • 示例
      • del ~/a, del /root/a, del a, del \^a, del '^a', del 'a/*/*'
      • undel ~/a, undel /root/a, undel a, undel ~/.Trash/root/a, del 'a/*/*'
      • pdel ~/a, pdel /root/a, pdel a, pdel ~/.Trash/root/a, del 'a/*/*'
      • tt, tt ~, tl '*/*'
      • tl, tl ~, tl '*/*'
    4 replies    2021-05-31 11:25:44 +08:00
    no1xsyzy
        1
    no1xsyzy  
       May 28, 2021
    trash-cli ?
    ducks
        2
    ducks  
       May 30, 2021
    safe-rm 用了多年,给自己一个后悔的机会 哈哈
    twfb
        3
    twfb  
    OP
       May 31, 2021
    @no1xsyzy 刚看了下 trash-cli 很多功能类似, 也有一些不同的地方

    trash-cli: 可以清空指定日期的垃圾文件
    py-recycle: 树的形式显示垃圾文件, 恢复命令有垃圾文件自动补全, 记录垃圾文件大小, 支持正则

    "清空指定日期的垃圾文件", 这个功能目前我还没用到, 日后再添加
    twfb
        4
    twfb  
    OP
       May 31, 2021
    @ducks 经常 rm 删了以后, 过了几天就后悔了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   977 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 19:04 · PVG 03:04 · LAX 12:04 · JFK 15:04
    ♥ Do have faith in what you're doing.