echo /etc/*_ver* /etc/*-rel*; cat /etc/*_ver* /etc/*-rel*
echo /etc/*_ver* /etc/*-rel* will print the names of all of the files in the
/etc directory that contain
cat /etc/*_ver* /etc/*-rel* will print the contents of all of the files that were listed by the first command.
For example, if you have a file called
/etc/version and a file called
/etc/release, the first command will print:
The second command will then print the contents of both of those files.
This command can be useful for finding and viewing the version and release information for your Linux distribution.
Here is an explanation of the commands:
echois a command that prints text to the console.
*is a wildcard that matches any number of characters.
-relare patterns that match files that end with those strings.
catis a command that prints the contents of a file to the console.