
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
Triangle Linux Users Group to hold installfest
Members of the Triangle Linux Users Group (TriLUG) are having a meetup to discuss and demonstrate Linux for you. Keep...
Why do you love Linux?
We’ll collect your ideas in a future “round-up” article with comments from our community!
Minty Fresh on a Meerkat: My Latest Linux Setup
A trip to Denver and the System76 factory in 2018 afforded me a chance to meet their technology team and...
Read long lines with getline
Getline offers a more flexible way to read user data into your program without breaking the system.
Rhythmbox is a great music player for GNOME
I like Rhythmbox as my music player on Linux because it’s simple and stays out of my way.
How do I choose a Linux distribution?
I see a lot of potential Windows refugees asking this question on the two social media sites I still use,...