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
Why I Installed Fedora Server on My Primary Workstation — and How
Customizing a Fedora system from a minimal command line only installation.
Saving Public Library Computers With Linux Mint MATE
I was volunteering at the local public library, where I find myself frequently these days. The library has some older...
Why I Didn’t Convert My Primary Workstation to BtrFS
When I started writing this series about the BtrFS filesystem, I fully intended to migrate my primary workstation from EXT4...
Converting to BtrFS — Episode 5
The previous step in conversion of my main test computer from EXT4 filesystems on a Logical Volume Manager (LVM) base,...
Why I prefer tar to zip
I love having choices when it comes to computing, and especially in the world of open source we're spoilt when...