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
Announcing the 3rd Edition of “Using and Administering Linux”
I've just signed the contracts for the 3rd Edition of my "Using and Administering Linux" series of books, that together...
Fresh KDE Innovation Meets Ubuntu Stability
Recently, I came across a blog post about the latest release of Plasma KDE Neon, and it piqued my curiosity. I...
Getting Help for Linux
If you're a newcomer to Linux, or you are considering making the move to Linux, one question you'll most certainly...
Nine traits of the veteran Unix admin
Follow this field guide if you want to understand the rare and elusive hard-core Unix geek
A Distributed WordPress Cracking Attack
If you're running a server connected to the Internet, it's under constant attack from the crackers wanting to steal personal...