viktomas / godu Goto Github PK
View Code? Open in Web Editor NEWSimple golang utility helping to discover large files/folders.
License: MIT License
Simple golang utility helping to discover large files/folders.
License: MIT License
Now I need a keyboard shortcuts help. ) Like pressing '?' in GitHub to remind that are the abilities that godu
provides beyond fat dir navigation.
hey , it would be good if u add it to scoop.sh
as window package manger ?
If this program have colors, as in gdu (for example), it would be very beautiful.
I'm waiting for PR gdamore/tcell#140 to get merged, Then I can remove my workaround:
cb66c47
Right now are the file view columns right next to each other. If the filename is too long it pretty much joins the 2 columns in one long line.
There should be one or two cell margin between columns
Right now godu showins filesize followed by a space and filename. There could be more pleasing way like for example
file1 4G
file that is a bit longer 1G
small file 147K
Just thought I'd open an issue for what's mentioned in the readme. This should behave similar to .gitignore
.
Perhaps have a look at gobwas/glob. It should allow matching directories and file names.
I'm happy for anyone to contribute with the new screencast. I'm using Peek on Ubuntu
Build binaries for people to install, something like https://github.com/simeji/jid
right now if file contains ' it breaks the quote around whole filename
Right now godu takes user input line by line, If the line is a number, it will parse it as Enter
command otherwise it a GoBack
.
There should be first an investigation of what UI would bring the most bang for the buck.
After this is clear it can be either implemented as a part of this issue or split into more issues.
WaitGroup.Add
method should be called only from the main goroutine.
// Note that calls with a positive delta that occur when the counter is zero
// must happen before a Wait. Calls with a negative delta, or calls with a
// positive delta that start when the counter is greater than zero, may happen
// at any time.
This is not true in walkSubFolderConcurrently
since it's called recursivelly from the nested goroutines.
Just get "2021/05/14 15:52:45 terminal entry not found" when launched in kitty [https://github.com/kovidgoyal/kitty]. Runs correctly in urxvt, termite, etc.
go1.16.4 linux/amd64
kitty 0.20.3
This is note from #39
We are now using folder/tree/file, often interchangeably. I think we should come up with naming convention going forward. I was thinking about calling everything file, but that might be more confusing. Maybe we can say that folder is a special case of file and stop using tree completely.
I'm going to have a look into unifying the naming convention before moving onto tackling #14
During using godu
I find that I'm often "fishing" for certain amount of space I want to clear. Status bar like in majority text editors would be very handy it could contain:
I'd like to make the installation of godu
easier and hence more accessible to broader public. It's very simple if the user uses golang
but for others the process of downloading a binary and putting it on path might be more complicated.
Would it be possible to save the result of the run to a file that can be displayed with the same user interface (like how atop does it) ? My runs take quite a long time and I lose the whole session when I leave. I know the results would not be live but it would still be a lot of help identifying large files and directories (which I can double check manually) especially on a slow moving server.
(I do not strictly need this but I am posting it as a nice feature to have depending on the scope you have in mind)
While clearing .cache it is nice to see the time of the last access for files inside of each dir.
Scanning a folder can be sped-up incredibly by adding some of Go's concurrency features: https://github.com/viktomas/godu/blob/master/core/file_walker.go#L31
godu
fails to install without sudo
$ go get -u github.com/viktomas/godu
go install os/user: open /usr/local/go/pkg/linux_amd64/os/user.a: permission denied
$ go version
go version go1.8 linux/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/anatoli/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build539612467=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
I am quite used to less
way of quitting from console programs by just pressing q
key. It would be great if godu
supported that as well.
Explore the possibility of introducing Makefile.
It would be nice to unify the way how release.sh
and testCover.sh
are used.
The columns are now having fixed height with showing only first x files in a folder. All other files are overflowing past the screen and nobody can ever see them.
The expected behavior would be something like the ranger
where the columns starts scrolling when the cursor is 9 rows from the edge of the screen.
It starts scrolling past this padding when we approach end/beginning of the list.
If screen has lest then 18 rows we are showing the cursor in the middle.
It appears that godu does not recognize sparse files such as the Docker.raw
file used by Docker on macOS. This file is a sparse file which is usually defaulted to 64 GB. It only takes up a few GB of used space though. Disk utilities such as du
and dust
recognize this as a sparse file and do not report the unallocated size. It would be nice if godu also supported sparse files.
The idea is to have a shortcut like 'x' or 'r' to remove the selected file/dir when scrolling trough
the view and have the view jump to the upper directory and refresh this one as well as every directory above by a simple substraction (without a scan).
Also a shortcut to rescan the selected directory would be cool (if other apps changed it).
I guess when no big file/dir to display, like running on godu's repository with default limit, this error occurs.
Is there an APT version, or a PPA? (for debian/ubuntu)
# cd .; git clone https://github.com/tomasvik/godu /Users/me/gopath/src/github.com/tomasvik/godu Cloning into '/Users/me/gopath/src/github.com/tomasvik/godu'... remote: Repository not found. fatal: repository 'https://github.com/tomasvik/godu/' not found package github.com/tomasvik/godu: exit status 128
you have the wrong path to the repo in the readme.
godu supports pruning a folder structure from files/folders that are less than some limit. The main benefit of which is that the output is not necessarily long. My use case is finding files that have hundreds of MB and I forgot them somewhere on the drive.
This limit is now hardcoded to 10MB, it should be configurable by -l
and --limit
flag.
Currently there is no mechanism to differentiate between file and folder in core.File
structure. file is just a folder with no files in it. It would be nice to make this dinstinction for two reasons:
The meaning of the test is being lost in initialization of the folder tree. Especially with the change towards bi-directional tree (by introductin File.Parent
in #18).
There is increasing need for abstraction over the tree. What I'm thinking is string that would define the whole folder structure.
Example
testFolder = "a(b:50,c:100,d(e:100))"
that would introduce equivalent of
testFolder := &File{"a", nil, 250, true, []*File{
&File{"b", nil, 50, false, []*File{}},
&File{"c", nil, 100, false, []*File{}},
&File{"d", nil, 100, true, []*File{
&File{"e", nil, 100, false, []*File{}},
}},
}}
// please not that the parent field is not filled in for simplicity
Once godu is run, there is no update for a while on a big volume.
My suggestion would be to use a one line, in place updating message of what's happening.
Additionally, you could give a cmd line option to list each line output so that somebody can pipe it to a txt file if they want to see it differently.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.