Timeline for Get the exact size of files retrieved by find output
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 27, 2019 at 6:16 | history | edited | smac89 | CC BY-SA 4.0 |
added 331 characters in body
|
| Sep 27, 2019 at 5:21 | comment | added | user313992 |
There's no guarantee that xargs won't run the du multiple times, and unlike a dumb du -sch $(find ..) that will not give the user any indication that there are too many files. Notice that xargs will run its command with argument batches much smaller than the maximum of the OS. On busybox: yes badger | xargs sh -c 'echo $#' sh | sed 1q => 4678.
|
|
| Sep 27, 2019 at 4:13 | history | edited | smac89 | CC BY-SA 4.0 |
added 16 characters in body
|
| Sep 25, 2019 at 20:49 | comment | added | aldehc99 | I have tested it with several files and realized it cannot handle filenames containing spaces. It seems to split said filenames, making the other part of them look like other commands: du: cannot access `./TESTINGFILE': No such file or directory When the filename does not contain spaces it works as expected. | |
| Sep 25, 2019 at 20:16 | comment | added | smac89 | @aldehc99 glad to hear it. What was the error you get with the last command? | |
| Sep 25, 2019 at 20:09 | vote | accept | aldehc99 | ||
| Sep 25, 2019 at 20:08 | comment | added | aldehc99 | Great contribution @smac89 Your first two commands worked just fine. They piped correctly the output and executed what I needed. You're right, in the Busybox page there is not support for --files0-from in du but they got the job done. Contrary to this, the latter command didn't work, it printed some du:invalid option exceptions. | |
| Sep 25, 2019 at 19:11 | history | edited | smac89 | CC BY-SA 4.0 |
deleted 9 characters in body
|
| Sep 25, 2019 at 18:57 | history | edited | smac89 | CC BY-SA 4.0 |
added 10 characters in body
|
| Sep 25, 2019 at 16:39 | history | edited | smac89 | CC BY-SA 4.0 |
added 310 characters in body
|
| Sep 25, 2019 at 16:25 | history | answered | smac89 | CC BY-SA 4.0 |