
Creating test files
Last Updated on September 3, 2024 by David Both
Some of my books and articles require you to create some files for testing. This can be done easily from the command line.
- Open a terminal session on your desktop.
- Copy the line below from this post.
- Paste it into the terminal session.
- Press the Enter key.
This Bash program creates 200 files with “Hello world filexxx” in each, where xxx is the file number. You can edit the program and change “200” to any number of files that you need.
for X in `seq -w 200` ; do echo "Hello world file$X" > testfile$X.txt ; done
More Stories
Building a random text generator
Generate your own random placeholder text by writing a few lines in Bash.
Exploring GNU Algol 68
Since early 2019, I’ve spent some time here and there refreshing my appreciation for the Algol 68 programming language, courtesy...
10 reasons to use Linux
Southern humorist, newspaper editor and columnist, comedian, and author, Lewis Grizzard once said that there are two kinds of naked...
Good Reasons for Linux as your daily driver
Linux stands out as a consumer operating system thanks to its unique blend of freedom, performance, and community-driven innovation. Whether...
End of 10…
There’s an interesting new movement gearing up as Win10 nears the end of it’s supported lifecycle. It’s called, “End of 10…” and can help keep 400 million computers out of the recycling stream — or worse, landfills.