In this part of our Linux tutorial, we'll again go over some more common aspects of Linux such as the wildcard characters as well as some common networking commands.
The * wildcard character
The character * is often referred to as the "wildcard" character. When used in tandem with commands, it often specifies the command to match any number of characters for a file, which is useful when working with multiple files or words. For example, the following command will list all files in the current working directory that end in the suffix -er:
Similarly, the following command will list all files in the current working directory that begin with the prefix -br
If we wanted to list all the .txt files or .sh files in our directory, we would then input the commands:
The ? wildcard character
The ? character is similar to the * character but it is instead more specific. While * specifies that any number of characters can fill the space, ? specifies that only 1 character per ? character can fill the space. Some examples of this are shown below:
If you happen to be or are looking to become a network administrator, Linux offers a variety of tools/commands that may turn out to be useful when maintaining or diagnosing a problem within the network. We'll go over a few of them:
nslookup *domain* - pulls up the dns information for the specified domain name. May need to run
sudo apt install dnsutils -y
sudo yum install bind-utils
if you are running a Debian or redhat system, respectively.
Note that Linux also includes a command, dig, included in the same package that is very similar to nslookup.
ping *domain name* - Runs a latency test from your device to the specified domain or IP address. Useful for testing connection strength.
netstat - Displays all incoming/outgoing network connections.
That'll be it for this short tutorial into Linux. There are plenty more uses for wildcard characters and different networking commands that weren't listed here, but these at least build the foundation for what you may be able to accomplish in the future.