dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory

Overview

Rust Crates.io Packaging status

dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory. It's parallel by default and will max out your SSD, providing relevant information as fast as possible. Optionally delete superfluous data, and do so more quickly than rm.

asciicast

Installation

Binary Release (all but Windows)

MacOS

curl -LSfs https://raw.githubusercontent.com/byron/dua-cli/master/ci/install.sh | \
    sh -s -- --git byron/dua-cli --crate dua

MacOS via MacPorts:

sudo port selfupdate
sudo port install dua-cli

MacOS via Homebrew

brew update
brew install dua-cli

Linux

Linux requires the target to be specified explicitly to obtain the MUSL build.

curl -LSfs https://raw.githubusercontent.com/byron/dua-cli/master/ci/install.sh | \
    sh -s -- --git byron/dua-cli --target x86_64-unknown-linux-musl --crate dua

Windows and others

See the releases section for manual installation.

Cargo

Via cargo, which can be obtained using rustup

For Unix

cargo install dua-cli

# And if you don't need a terminal user interface
cargo install dua-cli --no-default-features

For Windows, nightly features are currently required.

cargo +nightly install dua-cli

VoidLinux

Via xbps on your VoidLinux system.

xbps-install dua-cli

Fedora

Via dnf on your Fedora system.

sudo dnf install dua-cli

Arch Linux

Via pacman on your ArchLinux system.

sudo pacman -S dua-cli

Windows

You will find pre-built binaries for Windows in the releases section. Alternatively, install via cargo as in

cargo +nightly install dua-cli

Usage

# count the space used in the current working directory
dua
# count the space used in all directories that are not hidden
dua *
# learn about additional functionality
dua aggregate --help

Interactive Mode

Launch into interactive mode with the i or interactive subcommand. Get help on keyboard shortcuts with ?. Use this mode to explore, and/or to delete files and directories to release disk space.

Please note that great care has been taken to prevent accidential deletions due to a multi-stage process, which makes this mode viable for exploration.

dua i
dua interactive

Development

Please note that all the following assumes a unix system. On Windows, the linux subsystem should do the job.

Run tests

make tests

Learn about other targets

make

But why is…

…there two available backends? crossterm works everywhere!

Why add complexity to support termion if crossterm works everywhere? The answer is compile time and binary size, which both are larger when using crossterm. Thus on Unix we still build with termion, but there is no reason to stop supporting it once crossterm has no disadvantages.

The crosstermion crate makes handling this a bit less cumbersome.

Acknowledgements

Thanks to jwalk, all there was left to do is to write a command-line interface. As jwalk matures, dua should benefit instantly.

Limitations

  • Does not show symbolic links at all if no path is provided when invoking dua
    • in an effort to skip symbolic links, for now there are pruned and are not used as a root. Symbolic links will be shown if they are not a traversal root, but will not be followed.
  • Interactive mode only looks good in dark terminals (see this issue)
  • easy fix: file names in main window are not truncated if too large. They are cut off on the right.
  • There are plenty of examples in tests/fixtures which don't render correctly in interactive mode. This can be due to graphemes not interpreted correctly. With Chinese characters for instance, column sizes are not correctly computed, leading to certain columns not being shown. In other cases, the terminal gets things wrong - I use alacritty, and with certain characaters it performs worse than, say iTerm3. See https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt for the source.
  • In interactive mode, you will need about 60MB of memory for 1 million entries in the graph.
  • In interactive mode, the maximum amount of files is limited to 2^32 - 1 (u32::max_value() - 1) entries.
    • One node is used as to 'virtual' root
    • The actual amount of nodes stored might be lower, as there might be more edges than nodes, which are also limited by a u32 (I guess)
    • The limitation is imposed by the underlying petgraph crate, which declares it as unsafe to use u64 for instance.
    • It's possibly UB when that limit is reached, however, it was never observed either.
Comments
  • Build fails on Windows due to termion errors

    Build fails on Windows due to termion errors

    error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\lib.rs:24:9
       |
    24 | pub use sys::size::terminal_size;
       |         ^^^ maybe a missing `extern crate sys;`?
    
    error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\lib.rs:25:9
       |
    25 | pub use sys::tty::{is_tty, get_tty};
       |         ^^^ maybe a missing `extern crate sys;`?
    
    error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
     --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\async.rs:5:5
      |
    5 | use sys::tty::get_tty;
      |     ^^^ maybe a missing `extern crate sys;`?
    
    error[E0433]: failed to resolve: maybe a missing `extern crate sys;`?
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:29:5
       |
    29 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
       |     ^^^ maybe a missing `extern crate sys;`?
    
    error[E0432]: unresolved import `sys`
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:28:5
       |
    28 | use sys::Termios;
       |     ^^^ maybe a missing `extern crate sys;`?
    
    error[E0425]: cannot find function `get_tty` in this scope
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\async.rs:14:36
       |
    14 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
       |                                    ^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `get_tty` in this scope
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\async.rs:43:36
       |
    43 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
       |                                    ^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `set_terminal_attr` in this scope
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:45:9
       |
    45 |         set_terminal_attr(&self.prev_ios).unwrap();
       |         ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `get_terminal_attr` in this scope
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:90:23
       |
    90 |         let mut ios = get_terminal_attr()?;
       |                       ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `raw_terminal_attr` in this scope
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:93:9
       |
    93 |         raw_terminal_attr(&mut ios);
       |         ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `set_terminal_attr` in this scope
      --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:95:9
       |
    95 |         set_terminal_attr(&ios)?;
       |         ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `set_terminal_attr` in this scope
       --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:106:9
        |
    106 |         set_terminal_attr(&self.prev_ios)?;
        |         ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `get_terminal_attr` in this scope
       --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:111:23
        |
    111 |         let mut ios = get_terminal_attr()?;
        |                       ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `raw_terminal_attr` in this scope
       --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:112:9
        |
    112 |         raw_terminal_attr(&mut ios);
        |         ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error[E0425]: cannot find function `set_terminal_attr` in this scope
       --> C:\Users\Roy\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.2\src\raw.rs:113:9
        |
    113 |         set_terminal_attr(&ios)?;
        |         ^^^^^^^^^^^^^^^^^ not found in this scope
    
    error: aborting due to 15 previous errors
    
    Some errors occurred: E0425, E0432, E0433.
    For more information about an error, try `rustc --explain E0425`.
    error: Could not compile `termion`.
    warning: build failed, waiting for other jobs to finish...
    
    bug help wanted question windows-support 
    opened by rivy 29
  • dua takes too much time and it constantly hangs

    dua takes too much time and it constantly hangs

    Is there some kind of log that I can check to let me know why dua takes a very long time to complete (most of the time, I just kill it since I don't know when it will finish)

    but gdu always only takes a few seconds.

    Honestly, most of the time dua will just hang, like 8 out of 10 times(across several months, using different dua versions), I can not move my mouse in it, can not use Ctrl-c to quit it. I've tried using -x or not using it.

    Peek 2021-12-24 14-59

    FYI: ArchLinux dua 2.14.7 install from Arch repo gdu 5.12.1 install using go install

    question 
    opened by c02y 13
  • "File name too long" during git clone

    Cloning into 'dua-cli'...                                                                                                                                                                      
    remote: Enumerating objects: 510, done.                                                                                                                                                        
    remote: Counting objects: 100% (510/510), done.                                                                                                                                                
    remote: Compressing objects: 100% (230/230), done.                                                                                                                                             
    remote: Total 1906 (delta 339), reused 440 (delta 279), pack-reused 1396                                                                                                                       
    Receiving objects: 100% (1906/1906), 392.91 KiB | 8.73 MiB/s, done.                                                                                                                            
    Resolving deltas: 100% (1250/1250), done.                                                                                                                                                      
    error: unable to create file tests/fixtures/right-to-left/ثم نفس سقطت وبالتحديد،, جزيرتي باستخدام أن دنو. إذ هنا؟ الستار وتنصيب كان. أهّل ايطاليا، بريطانيا-فرنسا قد أخذ. سليمان، إتفاقية بين ما
    , يذكر الحدود أي بعد, معاملة بولندا، الإطلاق عل إيو.: File name too long                                                                                                                       
    fatal: unable to checkout working tree                                                                                                                                                         
    warning: Clone succeeded, but checkout failed.                                                                                                                                                 
    You can inspect what was checked out with 'git status'                                                                                                                                         
    and retry the checkout with 'git checkout -f HEAD'
    

    This is on a Linux system with an EXT4 filesystem.

    question wontfix 
    opened by oconnor663 10
  • Support integration with `xplr` by allowing to print paths selected for deletion

    Support integration with `xplr` by allowing to print paths selected for deletion

    Hi, Nice tool. I have added an integration hack with xplr. However, for better integration experience, is there a way to print the selected paths? This would allow migration of the dua-cli selected paths to xplr selection.

    enhancement help wanted good first issue 
    opened by sayanarijit 8
  • Failure in readme install instructions

    Failure in readme install instructions

    ~> curl -LSfs https://raw.githubusercontent.com/byron/dua-cli/master/ci/install.sh | \                                                                   1s 757ms
                                   sh -s -- --git byron/dua-cli --crate dua
    install.sh: GitHub repository: https://github.com/byron/dua-cli
    install.sh: Crate: dua
    install.sh: Tag: latest (v2.10.2)
    install.sh: Target: x86_64-unknown-linux-gnu
    install.sh: Installing to: /home/james/.cargo/bin
    install.sh: Downloading: https://github.com/byron/dua-cli/releases/download/v2.10.2/dua-v2.10.2-x86_64-unknown-linux-gnu.tar.gz
    
    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    
    opened by sullyj3 8
  • Are there any plans for adding binary release?

    Are there any plans for adding binary release?

    @Byron This tool is awesome. Thanks for your brillient work!

    Currently we have to install the entire set of rust SDK to compile and install it. This is a bit cumbersome for non-rust users. This also prevents us from using it on some server environment.

    So would you consider adding support for binary releases?

    enhancement 
    opened by wfxr 8
  • Provide option for not following symlinks

    Provide option for not following symlinks

    This just happened today so I think I should bring this up.

    Basically there's a folder that contains a ton of trash, but also happened to point to another important folder and I didn't know about that. So when I went ahead and cleaned up the first folder with the interactive mode, it also deletes the second one.

    So I wonder if an option can be added so that symlinks are not followed (or even make that the default behaviour) so things like this won't happen to other people as well.

    bug 
    opened by crides 8
  • Ignore 'special files' (originally: Ignore the /proc filesystem)

    Ignore 'special files' (originally: Ignore the /proc filesystem)

    Just ran: dua /. After a while, it printed:

    141.02 TB /    <3 IO Error(s)>
    

    ...my local disk is not that large. By, uh, several orders of magnitude.

    Going to / and running dua:

       0.00  B lost+found
       0.00  B mnt
       0.00  B root
       0.00  B srv
       2.54 KB dev
       3.52 KB .scripts
      85.26 KB run
       1.54 MB tmp
      30.85 MB etc
      81.55 MB boot
     657.30 MB sys
       1.85 GB bin
       1.85 GB sbin
      10.86 GB lib
      10.86 GB lib64
      18.13 GB opt
      19.76 GB usr
     118.48 GB home <1 IO Error(s)>
     130.30 GB var
     140.74 TB proc <2 IO Error(s)>
     141.05 TB total        <3 IO Error(s)>
    

    Seems like /proc is reporting very weird sizes.

    By the way, the different between dua / and cd /; dua was surprising, even though correct as per the help message.

    bug 
    opened by passcod 8
  • Goto the top of the list in interactive mode automatically after finished

    Goto the top of the list in interactive mode automatically after finished

    dua v2.10.7-1 installed from Manjaro repo or v2.10.10 downloaded from release page

    Whenever I use dua in interactive mode for a directory, the point is never located in the top item in the list when dua is loaded

    Peek 2021-02-08 23-44

    enhancement 
    opened by c02y 7
  • Hugh performance difference between dua v2.10.7 and v2.11.0

    Hugh performance difference between dua v2.10.7 and v2.11.0

    I installed v2.10.7 from Manjaro repo since it is the latest version from Manjaro testing branch v2.11.0 is just released so I tested it and notice it takes much more time than the v2.10.7

    $ time dua  /*
          0  B /dev
          0  B /lost+found
          0  B /mnt
          0  B /proc  <142 IO Errors>
          0  B /root
          0  B /srv
          0  B /sys
       4.10 KB /snap
       8.19 KB /rootfs-pkgs.txt
      24.58 KB /desktopfs-pkgs.txt
       1.99 MB /run
      17.85 MB /etc
     105.83 MB /boot
     178.76 MB /tmp
       1.12 GB /opt
       1.32 GB /sbin
       1.32 GB /bin
       6.80 GB /lib
       6.80 GB /lib64
       6.83 GB /var
      14.57 GB /usr
      18.25 GB /swapfile
     584.88 GB /home
     642.19 GB total  <142 IO Errors>
    
    ________________________________________________________
    Executed in  872.79 millis    fish           external
       usr time    2.69 secs  444.00 micros    2.69 secs
       sys time    7.85 secs   60.00 micros    7.85 secs
    
    $ time ./dua-v2.11.0-x86_64-unknown-linux-musl/dua  /*
          0  B /dev
          0  B /lost+found
          0  B /mnt
          0  B /proc  <67 IO Errors>
          0  B /root
          0  B /srv
          0  B /sys
       4.10 KB /snap
       8.19 KB /rootfs-pkgs.txt
      24.58 KB /desktopfs-pkgs.txt
       1.99 MB /run
      17.85 MB /etc
     105.83 MB /boot
     178.76 MB /tmp
       1.12 GB /opt
       1.32 GB /sbin
       1.32 GB /bin
       6.80 GB /lib
       6.80 GB /lib64
       6.83 GB /var
      14.57 GB /usr
      18.25 GB /swapfile
     584.88 GB /home
     642.19 GB total  <67 IO Errors>
    
    ________________________________________________________
    Executed in    3.28 secs   fish           external
       usr time   25.38 secs  438.00 micros   25.38 secs
       sys time   16.32 secs   56.00 micros   16.32 secs
    
    
    $ hyperfine "./dua-v2.11.0-x86_64-unknown-linux-musl/dua /*" "dua /*" -i
    Benchmark #1: ./dua-v2.11.0-x86_64-unknown-linux-musl/dua /*
      Time (mean ± σ):      3.530 s ±  0.131 s    [User: 25.066 s, System: 18.070 s]
      Range (min … max):    3.364 s …  3.703 s    10 runs
    
      Warning: Ignoring non-zero exit code.
    
    Benchmark #2: dua /*
      Time (mean ± σ):     977.0 ms ±  19.1 ms    [User: 2.933 s, System: 8.668 s]
      Range (min … max):   954.6 ms … 1008.0 ms    10 runs
    
      Warning: Ignoring non-zero exit code.
    
    Summary
      'dua /*' ran
        3.61 ± 0.15 times faster than './dua-v2.11.0-x86_64-unknown-linux-musl/dua /*'
    

    I also tested v2.11.0 and v2.10.10:

    $ hyperfine "./dua-v2.11.0-x86_64-unknown-linux-musl/dua /*" "./dua-v2.10.10-x86_64-unknown-linux-musl/dua /*" -i
    Benchmark #1: ./dua-v2.11.0-x86_64-unknown-linux-musl/dua /*
      Time (mean ± σ):      3.701 s ±  0.361 s    [User: 26.297 s, System: 19.272 s]
      Range (min … max):    3.362 s …  4.357 s    10 runs
    
      Warning: Ignoring non-zero exit code.
    
    Benchmark #2: ./dua-v2.10.10-x86_64-unknown-linux-musl/dua /*
      Time (mean ± σ):      4.242 s ±  0.056 s    [User: 29.691 s, System: 22.055 s]
      Range (min … max):    4.175 s …  4.311 s    10 runs
    
      Warning: Ignoring non-zero exit code.
    
    Summary
      './dua-v2.11.0-x86_64-unknown-linux-musl/dua /*' ran
        1.15 ± 0.11 times faster than './dua-v2.10.10-x86_64-unknown-linux-musl/dua /*'
    

    Don't know if you notice this issue

    question 
    opened by c02y 6
  • show the current directory in the footer

    show the current directory in the footer

    I kept getting lost in interactive mode so thought it would be nice to display where the user currently is in the hierarchy

    Not sure if this is the right place to add this change, but it seems to do something useful for me.

    opened by smason 5
  • Seems like `-x` doesn't work with rclone fuse mounts?

    Seems like `-x` doesn't work with rclone fuse mounts?

    I'm having a hard time telling what's going on, but it seems like dua is still crossing FS boundaries and trying to enumerate huge rclone shares when I use -x.

    help wanted question 
    opened by colemickens 1
  • Skip through single parent directory in interactive mode

    Skip through single parent directory in interactive mode

    If given a single directory as parameter in interactive mode (e.g. dua i Developer), dua-cli's initial state will be like:

    Screen Shot 2021-10-25 at 01 33 57

    However there's nothing useful here, the total usage is available at the bottom and the percentage will certainly be 100%. What users expect is more likely this (e.g. dua i Developer/*):

    Screen Shot 2021-10-25 at 01 33 52

    (The entries difference is because we are not counting the parent directory, but that should not matter.)

    There should a badge or something like that to inform the users dua-cli has skipped through the parent directory.


    If dua-cli can skip all single parent directory, that will be more awesome.

    Let's suppose we have the following file structure:

    a
    └── b
       └── c
          ├── 1
          ├── 2
          ├── 3
          ├── 4
          ├── 5
          ├── 6
          ├── 7
          ├── 8
          ├── 9
          └── 10
    

    It is ideal that dua i a equals dua i a/b/c/*.

    enhancement help wanted question 
    opened by kidonng 2
  • Ability to filter scan by file type/extension?

    Ability to filter scan by file type/extension?

    On a server with user uploaded content, it'd be useful to do some analysis by knowing a breakdown of disk size by file type, although sometimes it's preferable to just query a particular extension(s), such as for image or archive file formats.

    This seems to be a rare feature for some reason among similar projects, I'm unsure why. At best it's usually the ability to exclude directories or files/extensions.

    enhancement 
    opened by polarathene 1
  • Enhancement request: refresh/recompute

    Enhancement request: refresh/recompute

    Hello again,

    here is another idea for a potentially useful feature: add the possibility to refresh the entry list and recompute the sizes and percentages. This could be bound to the key r.

    This is useful if the files are modified (added, removed, resized) outside of the application while it is running in interactive mode.

    enhancement 
    opened by FedericoStra 6
Releases(v2.19.0)
Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

Benjamin Vaisvil 1.6k Jan 4, 2023
Given a set of kmers (fasta format) and a set of sequences (fasta format), this tool will extract the sequences containing the kmers.

Kmer2sequences Description Given a set of kmers (fasta / fastq [.gz] format) and a set of sequences (fasta / fastq [.gz] format), this tool will extra

Pierre Peterlongo 22 Sep 16, 2023
Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

Clément Nerma 2 Oct 3, 2022
Minimal recursive "truncate file/directory names to meet requirements" tool

trunc_filenames ssokolow@monolith ~ % trunc_filenames --help trunc_filenames 0.1.0 Rename files and directories to fit length limits. WARNING: Will n

Stephan Sokolow 2 Nov 20, 2022
A simple tool to clean all projects in a directory.

Cargo Cleanall A simple tool to clean all cargo projects in a directory. Help Cargo plugin to clean all cargo projects in a directory Usage: cargo cl

null 11 Jan 24, 2023
Rsre it's tool to rename file/directory

, Rust renamer Rsre it's tool to rename file/directory Zero dependencies ?? Requirements Rust Nightly Install With Cargo # Install nightly rust rustup

Awiteb 6 Dec 22, 2022
Hashlink bytecode disassembler, analyzer, decompiler and assembler.

Hashlink bytecode This repository contains a collection of Rust crates and cli tools to load, disassemble, decompile and analyze Hashlink bytecode. Re

Guillaume Anthouard 24 Dec 21, 2022
A fast static code analyzer & language server for Python

pylyzer ⚡ pylyzer is a static code analyzer / language server for Python written in Rust. Installation cargo (rust package manager) cargo install pyly

Shunsuke Shibayama 78 Jan 3, 2023
A opinionated and fast static analyzer for PHP.

TLDR; A static analyzer for PHP. It helps you catch common mistakes in your PHP code. These are the current checks implemented. Extending undefined cl

Denzyl Dick 11 Mar 6, 2023
High-Speed Memory Scanner & Analyzer with REST API.

memory-server High-Speed Memory Scanner & Analyzer with REST API. Usage iOS Jailbreaking of iphone is required. Place your PC and iphone in the same n

Kenjiro Ichise 8 Jul 12, 2023
A simple disk benchmark tool.

simple-disk-benchmark A simple disk benchmark tool. Operating Systems Currently, macOS and Linux are tested. Windows may work but is not tested. Devel

Jonathan Wight 7 Jul 31, 2023
Small and simple CLI app to generate .editorconfig based on a given settings.

add-editorconfig Small and simple CLI app to generate .editorconfig based on a given settings. Usage # Will create an .editorconfig in the current dir

Reinaldy Rafli 3 Jan 16, 2022
Command line utility to remove duplicates from the given input.

Command line utility to remove duplicates from the given input. Note that huniq does not sort the input, it just removes duplicates.

Karolin Varner 189 Dec 27, 2022
Test whether a given stream is a terminal

is-terminal Test whether a given stream is a terminal is-terminal is a simple utility that answers one question: Is this a terminal? A "terminal", als

Dan Gohman 19 Dec 31, 2022
Write a simple CLI script, that when given a 64-byte encoded string

Write a simple CLI script, that when given a 64-byte encoded string, it finds a suitable 4-byte prefix so that, a SHA256 hash of the prefix combined with the original string of bytes, has two last bytes as 0xca, 0xfe. Script should expect the original content of the string to be passed in hexadecimal format and should return two lines, first being the SHA256 string found and second 4-byte prefix used (in hexadecimal format).

Andy Bell 0 Feb 4, 2022
Fetch and extract HTML's title and description by given link.

extd Fetch and extract HTML's title and description by given link. Usage in Cargo.toml: [dependencies] extd = "0.1.4" Example use extd::extract_td; f

null 4 Nov 4, 2022
To help prevent directory traversal attacks

safe_join Use SafeJoin::safe_join in place of Path::join to help prevent directory traversal attacks. A call of the form dir.safe_join(path) returns a

Trail of Bits 1 Dec 27, 2021
A simple command line program to upload file or directory to web3.storage with optional encryption and compression

w3s-cli A simple command line program to upload file or directory to web3.storage with optional encryption and compression. Features Uploads single fi

qdwang 5 Oct 22, 2022
Periodically download a youtube playlist, extract audio, convert to mp3, move to directory (possibly synced using syncthing).

auto-dl Periodically download a youtube playlist, extract audio, convert to mp3, move to directory (possibly synced using syncthing). drop https://git

Paul Adenot 10 Jan 12, 2023