Get the geographical location of an IP address and other networking tricks.

To get the geographical location of an IP address, use this command. This uses ipinfo.io and gets a lot of information about the IP address. 4.4 Tue Mar 17 jason@Yog-Sothoth 0: $ curl -s ipinfo.io/203.113.124.148 | awk ‘{print $2}’ | sed ‘s/"//g’   203.113.124.148, 203-113-124-148.revip.totidc.net, Bangkok, Bangkok, TH, 13.7540,100.5014, AS131293…

Read More

How to cat a gzipped logfile with gunzip properly.

The gunzip utility can uncompress logfiles that are gzipped in archives, but this is not needed. To read a logfile that is gzipped, you can also use this command to print the contents to a terminal and not bother uncompressing the file. This allows reading log files in /var/log without…

Read More

Very interesting and strange bash trick with ls.

This is a very interesting bash trick I found using ls. This runs the ls command with random parameters. This is not very useful, but interesting nonetheless. 4.4 Tue Mar 03 jason@Yog-Sothoth 0: $ ls -`cat /dev/urandom | tr -dc ‘hula’ | head –bytes 1`4.4 Tue Mar 03 jason@Yog-Sothoth 0:…

Read More

How to get DVD playback working on Ubuntu. This is very easy.

To get DVD playback working on Ubuntu, the libdvdcss library is required. This is easily installed and necessary to decode a DVD properly for playback. Install this package to prepare for installation. This also allows automated updates to the library. 4.4 Sat Feb 29 jason@Yog-Sothoth 1: $ sudo apt install…

Read More

How to use the command line to change GTK settings easily.

The settings used by the file chooser in MATE or Gnome can be changed easily with the command line. The gsettings utility makes this easy. This example will alter the Firefox file chooser, it will have directories listed first, in descending order, sorted by date modified. gsettings set org.gtk.Settings.FileChooser sort-column…

Read More

Renaming folders with a loop in bash is easy.

Renaming folders is very easy. I have a folder with subdirectories named from 1 to 9. And I wish to rename them folder1 to folder9. This can be easily done with bash. This example will take care of this problem easily. 4.4 Fri Jan 31 jason@Yog-Sothoth 0: $ for i…

Read More

List installed snap apps on Linux with the command line.

The snap system allows the installation of apps into containers in your Linux system. This is very easy to use and allows easy use of a needed app. It is very easy to list which apps are installed this way. Use the snap list command to list all installed snap…

Read More

A one-liner that will list only the mounted removable drives on your system.

This command will only list the mounted removable drives on your Linux system. The ones under /dev/sd*. This is very easy to use. 4.4 Mon Jan 13 jason@Yog-Sothoth 0: $ cat /etc/mtab | grep /dev/s[a-f]/* /dev/sda2 /media/jason/Seagate\040Expansion\040Drive fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0 /dev/sdb4 /media/jason/My\040Stuff fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 04.4 Mon Jan 13…

Read More

Back up your home directory easily with this simple script.

Back up your home directory with this simple script. This will concatenate all of your files into one tar archive, then compress it into a gzipped file. Firstly, install the required applications. ┌──(john㉿DESKTOP-PF01IEE)-[~/Documents] └─$ sudo apt install pv pigz┌──(john㉿DESKTOP-PF01IEE)-[~/Documents] └─$ sudo apt install pv pigz This is the backup script…

Read More

Download only the audio from a video on Vimeo.

The video hosting site Vimeo works the same as Youtube, it has separate files for video and audio that are put together to play an online video. This can be downloaded easily with a script. The youtube-dl script can download only the audio from a Youtube video, and it can…

Read More

How to create thumbnails of dds files in Ubuntu or Mint.

Thumbnailing for the DirectDraw Surface file format is not supported in Linux with the Caja file manager, but this is easy to fix. The /usr/share/thumbnailers/ directory contains all of the thumbnailer files that automatically create thumbnails in the file manager for Caja. Just create a file named dds.thumbnailer and put…

Read More

Very useful Linux bash shell tricks.

There are many very useful shell tricks when using the bash shell on Linux or UNIX. Print the last used command-line arguments with a keyboard shortcut. ESC-. This will print the last used command-line arguments to the prompt. Very useful if it is a very long one-liner. Print a listing…

Read More