Copy a 32-Character Random String to a Destination Folder
In a Unix-like shell, create a file inside SOME-DESTINATION-FOLDER that contains a 32-character alphanumeric string derived from /dev/urandom. The folder SOME-DESTINATION-FOLDER should exist (you may create it if needed). Use only ASCII letters and digits for the string.
Steps:
Create the destination folder if it doesn't exist: mkdir -p SOME-DESTINATION-FOLDER
Generate a 32-character random string from /dev/urandom: tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32
Write the string to a file named random32.txt inside the destination folder: tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32 > SOME-DESTINATION-FOLDER/random32.txt
Verify the file's length is 32 characters: wc -c SOME-DESTINATION-FOLDER/random32.txt
Deliverables:
Path to the created file: SOME-DESTINATION-FOLDER/random32.txt
The 32-character string contained in the file (you can display it with: cat SOME-DESTINATION-FOLDER/random32.txt)
Notes:
Do not modify the placeholder; replace it only by ensuring it exists during execution.
You can run the commands in a single shell session or script.