Giter Site home page Giter Site logo

mdunsmuir / dredge Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 48 KB

utility for inspecting disk usage in directory trees

License: GNU General Public License v3.0

Rust 100.00%
rust directory-tree filesystem disk-cleaner disk-space utility terminal

dredge's Introduction

dredge

Crates.io Status

A utility for inspecting disk usage in directory trees.

Usage

dredge <directory to inspect>

k and PgUp go up, j and PgDn go down, l descends one level down into the selected directory, and h goes one level up. q quits.

d deletes a file or directory; you will see a (y/N) prompt each time you use this function. The deletion is recursive, i.e. deletion of a directory will delete all its contents. Symbolic links will be deleted without following. The delete function will always delete something if you have the permissions to do so, e.g. if a file or directory is write protected but owned by you, it will be deleted just like any other file. Directories containing write protected files will similarly be deleted with no special warning.

Caveats

  • Deletion of write-protected files, see above.
  • dredge is pretty dumb. If it can't delete a file for any reason, it just won't. The file won't disappear from dredge's listing, but otherwise you won't see any special feedback indicating that there was a failure.
  • Continuing on the "dredge is dumb" theme, dredge will generally ignore things it doesn't understand. It just won't show them to you, or you'll see a zero byte 'file' that can't be deleted.
  • dredge won't follow symbolic links. It just sees them as regular files, though it will show you the link targets.
  • dredge doesn't account for multiple hard links pointing to the same inode, i.e. it will count that disk usage twice.
  • dredge will happily cross filesystem boundaries without telling you.
  • dredge loads the target directory tree into memory on startup, and from that point onwards it never attempts to check the consistency of its model against the real thing. If you make changes outside of dredge and don't restart it, you won't see those changes (though deletion operations may fail if the files they target no longer exist).
  • dredge is fairly very wasteful in its use of memory. Memory's cheap, right?

Disclaimer

dredge is immature software written as a hobby project to learn Rust by someone (me) for whom the description "does not possess guru-level understanding of file systems" is a severe understatement of the actual level of ignorance involved. Though I don't think anyone will actually use it, I am releasing it because I've personally found it useful. I make no guarantees about it being bug-free, reasonably performant, correct in its presentation of data, or anything else.

Note that ncdu is a similar program with a much higher level of maturity, more cool features, and a larger user base. You should probably just use ncdu instead, for now.

dredge's People

Contributors

mdunsmuir avatar

Stargazers

 avatar

Watchers

 avatar

dredge's Issues

Refresh functionality

like press r to refresh the current directory and its children, updating the size

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.