Listen to music in the terminal and some other nice Linux tricks.

This nice command allows streaming some nice ambient drone music in the terminal with MPV. Very nice to listen to while doing other things. mpv http://ice.somafm.com/dronezone | sed -n "s/ icy-title: \(.*\)/\x1b[38;5;242m$(date +%T)\x1b[m | \1/p"mpv http://ice.somafm.com/dronezone | sed -n "s/ icy-title: \(.*\)/\x1b[38;5;242m$(date +%T)\x1b[m | \1/p" Play a Youtube video audio…

Read More

Returning just the interface name with Linux.

The network adapter name is easy to return on Linux. This simple one-liner will give this information to the user. jason@Yog-Sothoth » ~ » $ ip -o -4 route show to default | awk '{print $5}' enp0s25 Using this information to get information about a network adapter. jason@Yog-Sothoth » ~…

Read More

Use ls to only list files that start with an uppercase character.

The ls command may be used in conjunction with grep to list files that start with an uppercase letter or have an uppercase filename. ┌──(john㉿DESKTOP-PF01IEE)-[~/Documents] └─$ ls | grep "^[A-Z]" Boomsrc Hope is the good thing(The Shawshank Redemption 1994). [JAmspaaSNzE].f140.m4a Hope is the good thing(The Shawshank Redemption 1994). [JAmspaaSNzE].f160.mp4 Hope…

Read More

using the MySQL SELECT statement to only select certain records.

We are taking another look at our database table and we are wanting to only view records that match certain criteria. This is easy with the SELECT statement. mysql> select * from operatingsystems where vendor in ("Microsoft","Mint"); +——+————————+———+———–+ | OsID | Name | Type | vendor | +——+————————+———+———–+ | 1…

Read More