Fill in the blanks to complete the Bash script in which each file in a directory is renamed to its SHA256 hash?

By | November 20, 2022

Fill in the blanks to complete the Bash script in which each file in a directory is renamed to its SHA256 hash?

TARGET_DIR=/usr/local/certs –
for f in ‘__________ __________’; do
__________ $f’ openssl sha -sha256 -r < $f | cut -f1 -cl’ ”

  • A. See explanation below.
Answer: Option A.
Explanation: 

TARGET_DIR=/usr/local/certs –
for f in ‘/usr/local/certs’; do
echo $f’ openssl sha -sha256 -r < $f | cut -f1 -cl’ ”

The post Fill in the blanks to complete the Bash script in which each file in a directory is renamed to its SHA256 hash? appeared first on Majanto.