Scripting

Another way to randomize filenames

This post describes an easier way to randomize filenames using the command openssl compared to my previous post named Randomize filenames. #!/bin/bash for filename in *.JPG do mv “$filename” $(echo “$filename” | openssl rand -hex 3).JPG done After running this script the filenames can look something like this 26333c.JPG a8c7a0.JPG b16b22.JPG d69a67.JPG … The rand […]

Read More
Scripting

Create random filenames with random content

I wanted to test filesystem checking on a large XFS filesystem and needed to fill the filesystem. The task was to create files on random with different file size and names placed in different folders. The script I found on the Internet does exactly that #!/bin/bash # Created by Ben Okopnik on Wed Jul 16 […]

Read More