I happened to know this helpful program called PV (Pipe Viewer). Which can indicate the data in the piping. Most of Unix programs support piping, but may not all be giving you the progress of current process. When you send a huge file to a program, you might be wondering how long will it be taking to finish. Many programs do give you such information but there are some don’t.
So, here comes the PV. I made a simple and short video using the following commands in it:
head -c 50m /dev/urandom | pv -s 50m > test.bin pv test.bin | sha1sum pv test.bin | openssl aes-256-cbc -out out.aes ( pv -n test.bin | openssl aes-256-cbc -pass pass:fj32fsk -out out.aes ) 2>&1 | dialog --gauge 'Progess' 7 60
The first one is to generate a 50MB test file. Second one to generate the SHA1 hash of the test file. Third one is to use OpenSSL to encrypt the test file. And the last one is doing the same thing as previous but using dialog utility to give a better UI.
You can watch the video on YouTube or download the OGV.
You can check out the online manual, PV is available on Fedora and Debian already.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.