Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No updates until godu finishes full walk #14

Closed
sathishvj opened this issue Jan 8, 2017 · 7 comments · Fixed by #60
Closed

No updates until godu finishes full walk #14

sathishvj opened this issue Jan 8, 2017 · 7 comments · Fixed by #60
Projects

Comments

@sathishvj
Copy link

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.

@viktomas
Copy link
Owner

viktomas commented Jan 8, 2017

I was thinking about printing some warning that godu might take some time to walk through given directory.

With the second suggestion I'll first need to capture the full path of each file. Right now the root file has exactly the same name as CLI argument and every other file is relative to it.. I'm not sure how helpful would be the relative path.

@leonklingele
Copy link
Contributor

A single line at the very top / bottom would be nice to show additional information of #18, e.g. "marked files", "marked file size" (so you know how much space can be freed), ..

@viktomas
Copy link
Owner

viktomas commented Jan 8, 2017

Yes, I was thinking the same. I was planning to put absolute path in it, but marked file size would be a great thing as well. gdamore/tcell is providing TextBar which should give us exactly what we need: https://github.com/gdamore/tcell/blob/master/views/textbar.go

@viktomas
Copy link
Owner

viktomas commented Jan 9, 2017

@sathishvj are you happy with #18 functionality? Or did you mean full du functionality? If #18 fixes your second suggestion, then I'd like to close this issue.

@sathishvj
Copy link
Author

Presently you've given only a single line warning. What I was suggesting was using something like https://github.com/gosuri/uilive (single line update of files being processed) or like this https://github.com/gosuri/uiprogress.

Maybe similar to this http://masterex.github.io/archive/2011/10/23/progressbar.gif, but instead of showing % complete, you show how many files/folders traversed followed by the name of current file/folder being traversed.
$ godu
[ 12.2k files, 300 folders ] /Users/me/Docs/shopping/tobuy.txt

Additionally if there is a -l option for verbose, it could be a full listing with probably a separator of choice. Users could then pipe this to grep, sed, txt file, etc.
$ godu -l -s ":"
/Users/me/Docs/shopping:0kb:folder
/Users/me/Docs/shopping/tobuy.txt:5kb:file
/Users/me/Docs/shopping/bought.txt:12kb:file

Just suggestions you could consider, but thank you anyways for doing the project and taking suggestions.

@viktomas
Copy link
Owner

viktomas commented Jan 9, 2017

Understand now. I think that the first suggestion is great, The core.GetSubTree (https://github.com/viktomas/godu/blob/master/core/file_walker.go#L18) will need to change to run in separate thread and send updates to some channel. I'll keep this issue open.

The second suggestion is very close to result of directly calling du(1) command. I think that if godu tries to compete with that it will fail.

@sathishvj
Copy link
Author

For windows users, there isn't a good du. So this could help. And since it is go, it should work without issues in Windows also.
Still, as you think appropriate.

@viktomas viktomas added this to To do in godu v2 via automation Jul 8, 2018
@viktomas viktomas moved this from To do to In progress in godu v2 Aug 29, 2018
godu v2 automation moved this from In progress to Done Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
godu v2
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants