coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

du on Windows

Open garyemerson opened this issue 8 years ago • 3 comments

I'd be interested in having du compile on Windows. Looking at the code and compiler error msgs the only blocker is the use of std::os::unix::fs::MetadataExt. Seems like that could be fixed with a handful of #[cfg]'s. That would of course affect parts of the code that use MetadataExt and ultimately would lead to the following options not being included on Windows:

  • apparent-size
  • time
  • time-style
  • count-links

I'd personally still get use out of a du without these options. I'm down to work on this if ppl are open to these sorta changes.

garyemerson avatar Mar 10 '18 06:03 garyemerson

These sorts of changes are always welcome! Of course, if you manage to figure out how to get the equivalent info on Windows that would be preferable to disabling features, but ideally all the utils should be able to run in some form on any OS.

Arcterus avatar Mar 10 '18 07:03 Arcterus

My filesize crate may be of interest - it's already used by several Rust du-alikes and abstracts across Windows and Unix.

Freaky avatar May 30 '20 22:05 Freaky

Recommend marking as a duplicate of #1622 (which I implemented).

paulotten avatar Apr 06 '21 22:04 paulotten

Closing this ticket, fixed in https://github.com/uutils/coreutils/pull/1788

cakebaker avatar Sep 19 '23 14:09 cakebaker