How to list all password login failures in Ubuntu 20.04.

Users that try and fail to log in to your system leave a record in the system logs. This is how to find out what time this was and which user they attempted to log in as. The /var/log/auth.log file is the one that contains the login records. All successful…

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

Very useful bash awk scripting tricks.

Awk and bash are a very good combination for extracting certain text strings from a text file or the output of a program. Here I am extracting only the values that are surrounded by square brackets. 4.4 Mon Jan 27 jason@Yog-Sothoth 0: $ lspci | awk -vRS="]" -vFS="[" ‘{print $2}’…

Read More

Some very useful VIM tricks for the Linux/UNIX user.

VIM is a very useful and versatile editor for Linux. This is how to use it to its full potential. Some great VIM tricks to help for a Linux user or programmer. To read the output of a command into a text file, use the :r command in the command…

Read More

Windows 8.1 still very annoying and insecure these days.

Windows 8.1 at the moment is giving me a lot of problems. There is constant disk activity at 0.1 megabytes per second. This is very annoying, there are Windows services doing this, but it only recently started. T think it is better to use Linux instead, which does not have…

Read More

Play Stalker Call of Pripyat on Linux with OpenXray.

The new open-source OpenXray engine allows a gamer to run Call of Pripyat on Linux. This is how to install this very useful application. This comes as a PPA, just add the PPA to your system. 4.4 Thu Jan 16 jason@Yog-Sothoth 0: $ sudo add-apt-repository ppa:eagleivg/openxray4.4 Thu Jan 16 jason@Yog-Sothoth…

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

How to get a nice DOS styled shell prompt for fun in Linux.

This PS1 example gives the user a pretend DOS shell prompt. This is very interesting and would be fun to play with for an experienced user, or to complete a Windows themed desktop environment like Cinnamon. That can be made to look just like Windows 10. And with this shell…

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

Various tricks with C on Linux.

There are various tricks for programming on Linux. One useful trick is to open a file for reading with C. This is how to do this. The “r” option for fopen() will read the file into memory. #include <stdlib.h> #include <stdio.h>   int main(void) { FILE *f; char buf[256];  …

Read More