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 only, this is another way … 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 is the good thing(The Shawshank … Read more

Misc UNIX and Linux tricks for the desktop user and administrator.

Uptime. this is a useful command for finding out how long a Linux system has been running for. it also displays the load average over 1.5 and 15 minute intervals. deep-thought ~ # uptime 21:45:32 up 32 min, 3 users, load average: 1.88, 1.45, 1.08deep-thought ~ # uptime 21:45:32 up 32 min, 3 users, load … Read more

How to use color in the ls command to brighten up your directory listings.

Below we see output of the ls command when listing a directory. The –color=auto parameter allows the use of color if your terminal supports it. And since everyone either uses Konsole or Gnome Terminal; this command will always work. I am using zsh at the moment; but this works with just about any shell. ls … 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 | Windows 3.0 | Windows … Read more