Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select[FileNames["*", dir, Infinity],
- Not@*DirectoryQ] // Map[FileByteCount] // Total
- Select[FileNames["*", "~/Documents", Infinity], Not@*DirectoryQ] //
- Replace[
- Quiet@Map[FileByteCount, #],
- Except[_Integer] -> 0,
- 1
- ] & // Total // AbsoluteTiming
- {2.38783, 6161484250}
- ToExpression@
- StringSplit[
- RunProcess[{"du", "-s", ExpandFileName@#},
- "StandardOutput"]][[1]]*1024/2 &@
- "~/Documents" // AbsoluteTiming
- {0.352957, 6080770048}
Add Comment
Please, Sign In to add comment