
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
Resurrecting a Windows laptop
Recently, a friend gave me a recent model of a Hewlett-Packard Pavilion laptop. He said, “It turns on but goes...
Fix SELinux problems with this little-known option
SELinux is a security subsystem that works to prevent files and code from running from places they don't belong. It's...
Linux tools for network administrators
My initial reaction to Linux was that I did not fully understand its range of tools. At that time, I...
Keeping time with chrony
“Does anybody really know what time it is? Does anybody really care?” -- Chicago, 1969 Perhaps that rock group didn’t...
Open source Tools for Everyday Use
Many people don’t realize the abundance of free and open-source resources available online. Here are some of my favorite open-source...
Ventoy: The Ultimate Multi-Boot USB Tool
Giving friends and neighbors a bootable USB drive containing your favorite Linux distribution is a great way to introduce neophyte...