How to use the rig command: 2-Minute Linux Tips

Network World | Feb 19, 2021

In this Linux tip, learn how to use the rig command. It randomly generates name, address and phone number listings. It's useful when you're testing an application and need hundreds or thousands of addresses to make sure that it works correctly.

Copyright © 2021 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at the rig command that randomly generates name, address and phone number listings – useful when you're testing an application and need hundreds or thousands of addresses to make sure that it works correctly.
To generate a single identity record, just type rig and you'll get output like this.
Run the command again and you'll get an entirely different record:
Notice that the phone numbers have area codes and then only "x".
To create a file with many listings, all you have to do is add the -c option followed by the number of records that you want to create and then redirect the output to a file. In this example, I'll generate a file with 1,000 entries:
Notice how quickly the information is generated and added to the file.
The rig command uses files in the /usr/share/rig directory to create the names and addresses. You can add names and cities as long as you follow the format used and have root access, but the available data is sufficient to create as many as 2 million different names.
That’s your Linux tip for the rig command.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.

Popular
Featured videos from IDG.tv