Comments (5)
Definitely CC @piotrwach :).
from dua-cli.
That would be interesting for some use-cases for sure and quite straightforward to implement I presume if one uses standard Rust serialization.
from dua-cli.
@lachesis Can you describe your use case? It would help prfioritize this issue.
from dua-cli.
Not that anyone asked me but I do occasionally use pdu
's --json-output
and --json-input
to save and load results. You can produce different visualizations for the same data.
My main simple use case is that I have a bunch of old spinning HDDs connected to a low resource computer. I added HDDs slowly over time as I needed space so there was no scheme of what files were where. Too chaosy. So it was required to learn how space was being used then plan a way to move things around.
- Takes a long time even in rust so in this way I can set a task to collect the data then come back and sort through it later.
- Don't have to keep a terminal/ssh/tmux or any other kind of session active to preserve the information
- If you close a window you don't have to start completely fom scratch as I did on a few occasions.
- The json files can be moved to a better computer which is more pleasant to work on.
It's kind of like using locate
instead of find
. locate
periodically creates a database then lets you very quickly search through it, whereas find
starts from scratch every time. If your file-set is relatively stable the speed can be an acceptable trade off.
And since it's json I guess you can do all kinds of things with it.
I think it would be cool if dua
could do this because it's the one I like the best but tbh it is also acceptable to use the other available tools. As an intermediary, loading the jsons generated by pdu
would be cool because dua
does a much superior job of visualizing. But only once in a very long while with a very specific use case.
from dua-cli.
I also have few use cases where having ability to load a file system walk from a file would be very useful:
- I work with remote machines where I don't want to run
dua
. I could instead run some shell command that would list all the files that I could then load indua
on my machine. E.g.
$ ssh remote_host find /home -ls > listing.txt
$ dua i --from-file listing.txt
- I sometimes need to analyse what is taking space in my Amazon S3 bucket. For that I would like to run something similar as in 1) e.g.
$ s3cmd ls --recursive "s3://mybucket/*" > listing.txt
$ dua i --from-file listing.txt
Unfortunately the formats of listing.txt in both cases are quite different:
find:
$ find . -ls
19692507 0 drwxr-xr-x 7 pwach staff 224 9 Nov 07:39 .
19692508 8 -rw-r--r-- 1 pwach staff 1000 9 Nov 07:39 ./1000bytes
19692511 0 drwxr-xr-x 3 pwach staff 96 9 Nov 07:39 ./empty-dir
19692512 0 -rw-r--r-- 1 pwach staff 0 9 Nov 07:39 ./empty-dir/.gitkeep
vs
s3cmd
$ s3cmd ls --recursive "s3://mybucket/*"
2019-06-14 17:08 123 s3://mybucket/a/1.png
2019-06-15 17:08 456 s3://mybucket/b/2.png
For what it is worth, I have changed dua
to achieve 2) already, but since it is not universal / probably a bit out of scope of this project I think we need more universal way of doing this.
from dua-cli.
Related Issues (20)
- How to set the user default config?
- After using "dua i", how to move files or folders that do not need to be deleted?
- APFS Clones Support
- dua (non interactive) lost its ability to process files HOT 3
- Multiple dirs in --ignore-dirs not working as expected HOT 8
- Test fails on 32-bit targets HOT 1
- Duplicate key input on Windows since v2.23.0 HOT 5
- termion backend no longer works HOT 2
- Large graphs question
- Feature: Show modification date while sorted by size. HOT 4
- Feature: show free space on current mount point HOT 1
- ARM build can't execute on `aarch64`
- Show real file size on systems with ZFS compression enabled.
- performance: dua-cli full scan takes way longer than gdu HOT 7
- Performance is constrained by single-core CPU speed when I/O does not depend on CPU HOT 4
- error[E0446]: crate-private type `FilesystemScan` in public interface HOT 5
- Interactive navigation for tree with millions of files is really slow HOT 5
- Got a trojan threat from Windows defender when using dua HOT 4
- `dua a` will get the all the sizes of its content if the argv is one directory instead of the directory itself
- Cursor line not visible with NO_COLOR HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dua-cli.