All Projects → vmchale → Tin Summer

vmchale / Tin Summer

Licence: bsd-3-clause
Find build artifacts that are taking up disk space

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Tin Summer

Modclean
Remove unwanted files and directories from your node_modules folder
Stars: ✭ 309 (+19.31%)
Mutual labels:  disk-space, clean, cleaner
Kondo
Save disk space by cleaning non-essential files from software projects.
Stars: ✭ 373 (+44.02%)
Mutual labels:  disk-space, cleaner
Rtorrent Cleaner
🧹 rtorrent-cleaner is a tool to clean up unnecessary files in rtorrent
Stars: ✭ 36 (-86.1%)
Mutual labels:  clean, cleaner
Bulk Crap Uninstaller
Remove large amounts of unwanted applications quickly.
Stars: ✭ 1,212 (+367.95%)
Mutual labels:  disk-space, cleaner
Skrub
A package to remove junk from Composer installations and trim build sizes.
Stars: ✭ 91 (-64.86%)
Mutual labels:  disk-space, cleaner
diskspace
macOS command line tool to return the available disk space on APFS volumes
Stars: ✭ 123 (-52.51%)
Mutual labels:  disk-space, command-line-tool
Cleaner 42
Only for 42Network schools, Cleaner_42 script is linked to cclean command/program, and it saves you some memory space.
Stars: ✭ 186 (-28.19%)
Mutual labels:  clean, cleaner
diskusage
FANTASTIC SPEED utility to find out top largest folders/files on the disk.
Stars: ✭ 64 (-75.29%)
Mutual labels:  disk-space, command-line-tool
flynt-cli
CLI tool for the WordPress Flynt framework
Stars: ✭ 15 (-94.21%)
Mutual labels:  command-line-tool
AnyOption
C/C++ Command line and resource file option parsing
Stars: ✭ 83 (-67.95%)
Mutual labels:  command-line-tool
gomphotherium
Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Stars: ✭ 22 (-91.51%)
Mutual labels:  command-line-tool
js-cleanup
Smart comment and whitespace cleaner for JavaScript-like files
Stars: ✭ 22 (-91.51%)
Mutual labels:  clean
lux
A Swift library with a dedicated command-line tool to highlight plain code (e.g. for terminal output), HTML files code blocks or attributed strings (e.g. for macOS or iOS apps)
Stars: ✭ 22 (-91.51%)
Mutual labels:  command-line-tool
garmin-connect-export
Downloads gpx, tcx or original fit files from your Garmin Connect Account.
Stars: ✭ 42 (-83.78%)
Mutual labels:  command-line-tool
Typo3 Console
Console command for TYPO3 CMS
Stars: ✭ 254 (-1.93%)
Mutual labels:  command-line-tool
broom
A disk cleaning utility for developers.
Stars: ✭ 38 (-85.33%)
Mutual labels:  cleaner
harwest-tool
A one-shot tool to harvest submissions from different OJs onto one single VCS managed repository http://bit.ly/harwest
Stars: ✭ 89 (-65.64%)
Mutual labels:  command-line-tool
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (-1.54%)
Mutual labels:  command-line-tool
venmo
💰 Venmo CLI
Stars: ✭ 62 (-76.06%)
Mutual labels:  command-line-tool
kernel-run
Run any Jupyter notebook instantly using Kaggle kernels
Stars: ✭ 59 (-77.22%)
Mutual labels:  command-line-tool

The Tin Summer

Windows build status Build Status

If you do a significant amount of programming, you'll probably end up with build artifacts scattered about. sn is a tool to help you find those artifacts.

sn is also a replacement for du. It has nicer output, saner commands and defaults, and it even runs faster on big directories thanks to multithreading.

Installation

Script

Enter the following in a command prompt:

curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git vmchale/tin-summer

Binary install

If the script doesn't work for you, you can download a binary from the releases page.

Cargo

If your platform doesn't have binaries, or you just want to build from source, get cargo. Then:

 $ cargo install tin-summer

Make sure you are on nightly; otherwise

 $ rustup run nightly cargo install tin-summer

Use

To list directory and file sizes for the current directory:

$ sn f

To get a list of directory sizes concurrently, excluding version control:

 $ sn p --exclude '\.git|\.pijul|_darcs|\.hg'

To get a sorted list of the 12 biggest directories in $DIR:

 $ sn sort $DIR -n12

To search current directory for directories with build artifacts:

 $ sn ar

To look for artifacts or directories containing artifacts that occupy more than 200MB of disk space:

 $ sn ar -t200M

Accessibility

To turn off colorized output:

export CLICOLOR=0

Comparison (or, 10 Things I Hate About du)

Reasons to use du

  • Reads disk usage, not just file sizes
  • Optionally dereferences symlinks
  • Slightly faster on small directories
  • Stable and well-supported

Reasons to use sn

  • Faster on large directories
  • Uses regex for exclusions, making it dramatically faster than du when used with the --exclude flag.
  • Defaults to human-readable output
  • Colorized output
  • Nicer help via clap
  • Provides sorted output
  • Finds build artifacts
  • Reads file sizes, not disk usage
  • Extensible in Rust

Benchmark results

Directory Size Tool Command Time
600MB sn sn p 60.74 ms
600MB sn sn d 99.92 ms
600MB du du -hacd2 88.28 ms
4GB sn sn p 185.2 ms
4GB sn sn d 271.9 ms
4GB du du -hacd2 195.5 ms
700MB sn sn p 91.05 ms
700MB sn sn d 176.3 ms
700MB du du -hacd2 153.8 ms
7MB sn sn p 19.48 ms
7MB sn sn d 12.72 ms
7MB du du -hacd2 10.13 ms

These commands are all essentially equivalent in function, except that sn p may use more threads than sn a or du. Results were obtained using Gabriel Gonzalez's bench tool. You can see pretty criterion graphs here or here.

In summary: yes, sn actually is faster on larger directories, but it is also slower on small ones. I'm hoping to make it faster in the future; the current naïve concurrency model has obvious directions for improvement.

Screenshots (alacritty + solarized dark)

The Tin Summer

Displaying a user's timeline in a terminal.

du

Displaying a user's timeline in a terminal.

Heuristic for build artifacts

Currently, sn looks for files that either have an extension associated with build artifacts, or executable files that are ignored by version control. It also looks for "build directories", like .stack-work, elm-stuff, etc. and if it finds a configuration file like tweet-hs.cabal, it considers all their contents to be build artifacts.

Languages Supported

The following is a list of languages sn artifacts has been tested with. The intent is to support basically anything, so feel free to open a PR or start an issue.

  • [x] Haskell (incl. GHCJS)
  • [x] Rust
  • [x] Julia
  • [x] Python
  • [x] Elm
  • [x] Nim
  • [x] Vimscript
  • [x] TeX
  • [x] Idris
  • [x] FORTRAN
  • [ ] Ruby
  • [ ] C
Autoclean

sn can clean up your artifacts for you, but only for the above-indicated languages. It is still experimental, but it has been tested and should not delete unwanted files (though it may not clean everything it should).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].