[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sharing STDOUT in multiple sha256sum processes
From: |
Assaf Gordon |
Subject: |
sharing STDOUT in multiple sha256sum processes |
Date: |
Fri, 16 May 2014 14:15:08 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Hello,
I'd like to ask your advice, to verify that my command is correct.
I'm trying to calculate sha256 checksum on many files, in parallel.
A contrived example would be:
$ find /path/ -type f -print0 | xargs -0 -P5 -n1 stdbuf -oL sha256sum > 1.txt
Which would run at most 5 processes of "sha256sum",
and the output of all would be the file 1.txt.
Is it correct to assume that because "sha256sum" prints one line per file, and
"stdbuf -oL" makes it line-buffered,
that the content in "1.txt" will be valid (i.e. no inter-mixed lines from
different processes) ?
Thanks,
- gordon
- sharing STDOUT in multiple sha256sum processes,
Assaf Gordon <=