Thursday, June 26, 2014

grep or less for MAC address using regex

Easy enough:

grep -i '\([0-9A-F]\{2\}[:-]\)\{5\}\([0-9A-F]\{2\}\)' file.txt

Or less
less file
/([0-9A-F]{2}[:-]){5}([0-9A-F]{2})

Thursday, January 9, 2014

What package contains this file or library? Use "yum provides" to find out

If you are trying to install an application which gives an error about a missing file you might be able to use yum to easily determine the package and install it.
Error ex:
error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory

One way to resolve this is by using the provides option in yum.

In a terminal, as root (or sudo), type yum provides libssl.so.6 then copy and paste the resulting package name into yum install _____.