
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
How to fix unresolvable file conflict errors upgrading or installing software RPMs
I install updates on a pretty regular basis and -- most of the time -- they install without a problem....
Short report on the Perl / Raku Conference
This past weekend I attended the Perl / Raku conference in Greenville, SC, USA. It was a great weekend as...
The Linux Philosophy for SysAdmins, Tenet 22—Mentor the young SysAdmins
When I first started, I was a young and innocent SysAdmin. I was fortunate because I worked at a couple different jobs where other, seasoned SysAdmins were willing to mentor me and encourage me. None of them laughed at me when I asked what must have seemed to them to have answers that were blindingly obvious. None of these patient SysAdmins ever told me to RTFM.
Do I have enough space for that?
A little scripting goes a long way to make sure you won’t run out of space with an automated process.
Strange problems with switches
Network switches are supposed to be simple devices that work at TCP/IP layer 1, the hardware layer. As far as...