Compare commits

...

5 Commits

Author SHA1 Message Date
andy.boot 0d0206a5a5 Version: New version 2022-08-25 10:18:18 +01:00
andy.boot dfce0eec66 Fix: Warn if configuring threads fails
User reported this unwrap could fail, so log an error instead of using a
naked unwrap.
2022-08-25 08:59:15 +01:00
Kian-Meng Ang c148cd9044 Prettify md/yaml file
Resolved via `prettier --write .`
2022-08-24 08:59:30 +01:00
Kian-Meng Ang 2893f73f47 Fix typos
Found via `codespell -L crate`.
2022-08-24 08:55:00 +01:00
andy.boot 5103ebe0d8 Version: Increment version 2022-08-23 12:26:08 +01:00
6 changed files with 272 additions and 244 deletions
+40 -12
View File
@@ -81,18 +81,46 @@ jobs:
matrix: matrix:
job: job:
# { os, target, cargo-options, features, use-cross, toolchain } # { os, target, cargo-options, features, use-cross, toolchain }
- { os: ubuntu-latest , target: aarch64-unknown-linux-gnu , use-cross: use-cross } - {
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , use-cross: use-cross } os: ubuntu-latest,
- { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , use-cross: use-cross } target: aarch64-unknown-linux-gnu,
- { os: ubuntu-latest , target: i686-unknown-linux-gnu , use-cross: use-cross } use-cross: use-cross,
- { os: ubuntu-latest , target: i686-unknown-linux-musl , use-cross: use-cross } }
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , use-cross: use-cross } - {
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , use-cross: use-cross } os: ubuntu-latest,
- { os: macos-latest , target: x86_64-apple-darwin } target: aarch64-unknown-linux-musl,
- { os: windows-latest , target: i686-pc-windows-gnu } use-cross: use-cross,
- { os: windows-latest , target: i686-pc-windows-msvc } }
- { os: windows-latest , target: x86_64-pc-windows-gnu } ## !maint: [rivy; 2020-01-21] may break due to rust bug; follow possible solution from GH:rust-lang/rust#47048 (refs: GH:rust-lang/rust#47048 , GH:rust-lang/rust#53454 , GH:bike-barn/hermit#172 ) - {
- { os: windows-latest , target: x86_64-pc-windows-msvc } os: ubuntu-latest,
target: arm-unknown-linux-gnueabihf,
use-cross: use-cross,
}
- {
os: ubuntu-latest,
target: i686-unknown-linux-gnu,
use-cross: use-cross,
}
- {
os: ubuntu-latest,
target: i686-unknown-linux-musl,
use-cross: use-cross,
}
- {
os: ubuntu-latest,
target: x86_64-unknown-linux-gnu,
use-cross: use-cross,
}
- {
os: ubuntu-latest,
target: x86_64-unknown-linux-musl,
use-cross: use-cross,
}
- { os: macos-latest, target: x86_64-apple-darwin }
- { os: windows-latest, target: i686-pc-windows-gnu }
- { os: windows-latest, target: i686-pc-windows-msvc }
- { os: windows-latest, target: x86_64-pc-windows-gnu } ## !maint: [rivy; 2020-01-21] may break due to rust bug; follow possible solution from GH:rust-lang/rust#47048 (refs: GH:rust-lang/rust#47048 , GH:rust-lang/rust#53454 , GH:bike-barn/hermit#172 )
- { os: windows-latest, target: x86_64-pc-windows-msvc }
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Install any prerequisites - name: Install any prerequisites
Generated
+1 -1
View File
@@ -197,7 +197,7 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]] [[package]]
name = "du-dust" name = "du-dust"
version = "0.8.1" version = "0.8.3"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"assert_cmd", "assert_cmd",
+1 -1
View File
@@ -1,7 +1,7 @@
[package] [package]
name = "du-dust" name = "du-dust"
description = "A more intuitive version of du" description = "A more intuitive version of du"
version = "0.8.1" version = "0.8.3"
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"] authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
edition = "2021" edition = "2021"
readme = "README.md" readme = "README.md"
+18 -18
View File
@@ -1,4 +1,3 @@
[![Build Status](https://travis-ci.org/bootandy/dust.svg?branch=master)](https://travis-ci.org/bootandy/dust) [![Build Status](https://travis-ci.org/bootandy/dust.svg?branch=master)](https://travis-ci.org/bootandy/dust)
# Dust # Dust
@@ -10,35 +9,37 @@ du + rust = dust. Like du but more intuitive.
Because I want an easy way to see where my disk is being used. Because I want an easy way to see where my disk is being used.
# Demo # Demo
![Example](media/snap.png) ![Example](media/snap.png)
## Install ## Install
#### Cargo <a href="https://repology.org/project/du-dust/versions"><img src="https://repology.org/badge/vertical-allrepos/du-dust.svg" alt="Packaging status" align="right"></a> #### Cargo <a href="https://repology.org/project/du-dust/versions"><img src="https://repology.org/badge/vertical-allrepos/du-dust.svg" alt="Packaging status" align="right"></a>
* `cargo install du-dust` - `cargo install du-dust`
#### 🍺 Homebrew (Mac OS) #### 🍺 Homebrew (Mac OS)
* `brew install dust` - `brew install dust`
#### 🍺 Homebrew (Linux) #### 🍺 Homebrew (Linux)
* `brew tap tgotwig/linux-dust && brew install dust` - `brew tap tgotwig/linux-dust && brew install dust`
#### [Pacstall](https://github.com/pacstall/pacstall) (Debian/Ubuntu) #### [Pacstall](https://github.com/pacstall/pacstall) (Debian/Ubuntu)
* `pacstall -I dust-bin` - `pacstall -I dust-bin`
#### Windows: #### Windows:
* Windows GNU version - works
* Windows MSVC - requires: [VCRUNTIME140.dll](https://docs.microsoft.com/en-gb/cpp/windows/latest-supported-vc-redist?view=msvc-170) - Windows GNU version - works
- Windows MSVC - requires: [VCRUNTIME140.dll](https://docs.microsoft.com/en-gb/cpp/windows/latest-supported-vc-redist?view=msvc-170)
#### Download #### Download
* Download Linux/Mac binary from [Releases](https://github.com/bootandy/dust/releases) - Download Linux/Mac binary from [Releases](https://github.com/bootandy/dust/releases)
* unzip file: `tar -xvf _downloaded_file.tar.gz` - unzip file: `tar -xvf _downloaded_file.tar.gz`
* move file to executable path: `sudo mv dust /usr/local/bin/` - move file to executable path: `sudo mv dust /usr/local/bin/`
## Overview ## Overview
@@ -69,18 +70,17 @@ Usage: dust -f (Count files instead of diskspace)
Usage: dust -t (Group by filetype) Usage: dust -t (Group by filetype)
Usage: dust -z 10M (min-size, Only include files larger than 10M) Usage: dust -z 10M (min-size, Only include files larger than 10M)
Usage: dust -e regex (Only include files matching this regex (eg dust -e "\.png$" would match png files)) Usage: dust -e regex (Only include files matching this regex (eg dust -e "\.png$" would match png files))
Usage: dust -v regex (Exculde files matching this regex (eg dust -v "\.png$" would ignore png files)) Usage: dust -v regex (Exclude files matching this regex (eg dust -v "\.png$" would ignore png files))
``` ```
## Alternatives ## Alternatives
* [NCDU](https://dev.yorhel.nl/ncdu) - [NCDU](https://dev.yorhel.nl/ncdu)
* [dutree](https://github.com/nachoparker/dutree) - [dutree](https://github.com/nachoparker/dutree)
* [dua](https://github.com/Byron/dua-cli/) - [dua](https://github.com/Byron/dua-cli/)
* [pdu](https://github.com/KSXGitHub/parallel-disk-usage) - [pdu](https://github.com/KSXGitHub/parallel-disk-usage)
* [dirstat-rs](https://github.com/scullionw/dirstat-rs) - [dirstat-rs](https://github.com/scullionw/dirstat-rs)
* du -d 1 -h | sort -h - du -d 1 -h | sort -h
Note: Apparent-size is calculated slightly differently in dust to gdu. In dust each hard link is counted as using file_length space. In gdu only the first entry is counted. Note: Apparent-size is calculated slightly differently in dust to gdu. In dust each hard link is counted as using file_length space. In gdu only the first entry is counted.
+1 -1
View File
@@ -158,7 +158,7 @@ fn main() {
rayon::ThreadPoolBuilder::new() rayon::ThreadPoolBuilder::new()
.stack_size(usize::pow(1024, 3)) .stack_size(usize::pow(1024, 3))
.build_global() .build_global()
.unwrap(); .unwrap_or_else(|e| eprintln!("Warning: Could not configure threads {:?}", e));
let iso = config.get_iso(&options); let iso = config.get_iso(&options);
let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data); let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data);
+2 -2
View File
@@ -17,7 +17,7 @@ static INIT: Once = Once::new();
/// Copy to /tmp dir - we assume that the formatting of the /tmp partition /// Copy to /tmp dir - we assume that the formatting of the /tmp partition
/// is consistent. If the tests fail your /tmp filesystem probably differs /// is consistent. If the tests fail your /tmp filesystem probably differs
fn copy_test_data(dir: &str) { fn copy_test_data(dir: &str) {
// First remove the existing directory - just incase it is there and has incorrect data // First remove the existing directory - just in case it is there and has incorrect data
let last_slash = dir.rfind('/').unwrap(); let last_slash = dir.rfind('/').unwrap();
let last_part_of_dir = dir.chars().skip(last_slash).collect::<String>(); let last_part_of_dir = dir.chars().skip(last_slash).collect::<String>();
let _ = Command::new("rm") let _ = Command::new("rm")
@@ -196,7 +196,7 @@ pub fn test_apparent_size() {
} }
fn apparent_size_output() -> Vec<String> { fn apparent_size_output() -> Vec<String> {
// The apparent directory sizes are too unpredictable and system dependant to try and match // The apparent directory sizes are too unpredictable and system dependent to try and match
let files = r#" let files = r#"
0B ┌── a_file 0B ┌── a_file
6B ├── hello_file 6B ├── hello_file