Fedora Terminus Console Font

This is quick guide howto install Terminus Terminal / Consele font. Terminus Font is a clean, fixed width bitmap font, designed for long (8 and more hours per day) work with computers. Version 4.49.1 contains 1356 characters, covers about 120 language sets and supports ISO8859-1/2/5/7/9/13/15/16, Paratype-PT154/PT254, KOI8-R/U/E/F, Esperanto, many IBM, Windows and Macintosh code pages, as well as the IBM VGA, vt100 and xterm pseudographic characters. Sizes: 6x12, 8x14, 8x16, 10x18, 10x20, 11x22, 12x24, 14x28 and 16x32.
Read more →

Linux: Display / Show File Contents (tabs, line breaks, non-printing characters)

I write before guide, howto create file on Linux shell / command line without text editor (with cat command) and this is guick tip howto display / show file contents (tabs, line-breaks, non-printing characters (ASCII control characters: octal 000 – 037)) and display all on Linux shell / command line. This is very useful when you want to know the entire contents of the file. Example file I use /tmp/testing.
Read more →

Quit Bash Shell Without Saving Bash History (5 Methods)

Sometimes it is very useful to delete / remove Bash history partially or completely when log out. Here is my favourite methods howto log out / quit / exit Bash shell without saving Bash history. Remove Only Current Session Bash History and Leave Older History Untouched 1. Quit Bash Shell Without Saving History: Unset HISTFILE unset HISTFILE && exit 2. Quit Bash Shell Without Saving History: Kill Console kill -9 $$ Remove/Delete Bash History Completely 3.
Read more →

Linux: Create Text File on Linux Shell / Command Line

This is a very typical case, the need to create a temp file on the command line quickly. Opening editor, writing content, save file and quit editor is not the fastest possible way. A faster way is to use the cat command with the name of the file and write contents of the file and give the end-of-file character (Ctrl-D). This is guide, howto create (or append to) text file without text editor on Linux shell / command line.
Read more →

Install Memcached on Fedora 40/39/38, Red Hat (RHEL) / CentOS Stream 9/8, Rocky Linux 9.3

Memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load. Memcached is a very useful also in other cases, than only dynamic web applications. This guide explains howto install Memcached 1.6.26 stable version of distributed memory object caching system on Fedora 40/39/38, CentOS Stream / Red Hat (RHEL) 9/8, Rocky Linux 9.3. Fedora 40/39/38, CentOS Stream 9/8, Red Hat (RHEL) 9/8, Rocky Linux 9.
Read more →

Linux locate command: Find Files and Directories Quickly and Efficiently

This is quick guide howto find files and directories quick and efficiently on Linux with locate command. Linux find command is outdated, slow and complicated to use, so locate command is much better option. Locate basic usage find files and directories locate file # example locate httpd.conf locate path # example locate /X11/ Find (locate) ignore-case (not case sensitive) locate -i file # example locate -i netbeans Find (locate) only file name (basename) locate -b file # example locate -b shadow Limit locate output locate -l 100 file # example locate -l 50 conf Print number of found entries locate -c file # example locate -c conf Find (locate) with full file info Simply locate something and pipe output to ls command.
Read more →

cURL: Check Nginx/Apache Compression (br, gzip, deflate) is Working

This is a quick method to check with using cURL that Nginx/Apache (or any other web server) compression with Nginx ngx_http_gzip_module (gzip), Nginx google/ngx_brotli (br), Apache mod_brotli (br), Apache mod_gzip (gzip) and Apache mod_deflate (deflate) is working. Only the remote server headers are needed. Check that the Nginx/Apache Compression is Working Get headers curl -s -I -H 'Accept-Encoding: br,gzip,deflate' https://www.if-not-true-then-false.com -s option silent, disable progress bar. -I option which will make just HEAD request to server and get headers.
Read more →

YUM History (list, info, summary, repeat, redo, undo, new)

Yum (Yellowdog Update Modified) is RPM Packet Management system for Fedora, CentOS, Red Hat, OpenSuse etc. Yum history (list, info, summary, repeat, redo, undo, new) commands is added on 3.2.25 version. So this works every Linux Distros, which uses yum 3.2.25 or newer. Yum history command is a really useful in situations where the need to example rollback latest yum activity or undelete some deletes or just see what is updated lately.
Read more →

Add Hostname, Date, Time, Uptime, Load Average to Linux Terminal Title

This tip is really useful if you need/want to monitor multiple servers at the same time. This Tip works, as the tip, by which you can add the date and time the title of the Linux terminal, but it adds more usefull info to terminal title. Following bash one liner add hostname, date, time, uptime, users and load Average to Linux Terminal Title and updates it every second. This trick works at least following terminals: Gnome Terminal, xterm, urxvt, rxvt.
Read more →

PHP CLI Colors – PHP Class Command Line Colors (bash)

PHP Command Line Interface (CLI) has not built-in coloring for script output, like example Perl language has (perldoc.perl.org/Term/ANSIColor.html). So I decided to make own class for adding colors on PHP CLI output. This class works only Bash shells. This class is easy to use. Just create new instance of class and call getColoredString function with string and foreground color and/or background color. PHP Class for Coloring PHP Command Line (CLI) Scripts Output <?
Read more →

Delete files securely on Linux – Journaled file systems

Few days ago I write about shred, which work fine for old systems, like EXT2, but not so nice with journaled file systems. Modern file systems need something more robust, like dd and srm (a secure replacement for rm). Unlike the standard rm, srm overwrites and rename the files before unlinking them. This makes it very hard to recovery of the data. Create test file: echo "secure content" > /tmp/secure.
Read more →

Delete files permanently with shred command in Linux – Remove absolutely

Sometimes we need to delete files which content should disappear absolutely, completely and safely. Linux command rm just remove file and it’s still possible to dig out from the disk. Fortunately for Linux can be found in shred program that removes the files permanently. Shred command is easy and quickly to use cases when files need to deleted forever. Shred command usage Create test file: echo "testing testing" > /tmp/test.
Read more →

PHP Script to Generate PostgreSQL Table Partitioning (Part 2)

As Part 1 (Howto create PostgreSQL table partitioning) shows, making of PostgreSQL partitioning needs a lot of SQL commands. So this Part 2 explains how SQL commands for PostgreSQL partitioning can be made with a simple PHP script. This example script make SQL for child tables, indexes, trigger function and parent table trigger. This example script can make PostgreSQL table partitioning with using Date ranges. Script can be configured with following configuration section:
Read more →

Google search from Linux and UNIX command line

Today I started thinking that how cool is do some Google searches straight from command line. First I try to find some ready tricks from the Internet, but I couldn’t find quickly anything good. So I decide do a simple Bash function that can take Google search as parameter and open Firefox Browser (tab) with Google search. Sounds easy… :) First we need Google search URL without search parameter and it looks like this:
Read more →
Subscribe and follow: