Linux Resources

10 Useful Awk Command Examples in Linux

This article covers a few awk commands and scripts.

Awk is a scripting language used for manipulating data and generating reports.

The awk command programming language requires no compiling, and allows the user to use variables, numeric functions, string functions, and logical operators. 

AWK Syntax: 

$ awk options 'selection _criteria {action }' input-file > output-file

Functions of AWK:

1. AWK Operations: 

(a) Scans a file line by line 

(b) Splits each input line into fields 

(c) Compares input line/fields to pattern 

(d) Performs action(s) on matched lines 

2. Useful For: 

(a) Transform data files 

(b) Produce formatted reports 

3. Programming Constructs: 

(a) Format output lines 

(b) Arithmetic and string operations 

(c) Conditionals and loops 

Install Redshift on Linux Mint - Step by Step Process ?

This article covers the procedure of installing Redshift- the color temperature adjusting tool on a Linux system.

Also, we have shared with you the procedure of uninstalling this tool from your system if you do not want to use it any longer.

Redshift is a tool that is used to adjust the color temperature of your screen according to your surroundings.

The color temperature adapts to the time of the day. 

A different color temperature is set for the night and daytime. It applies a red hue or redness effect to your screen or graphical display. 

This helps reduce eye strain and lessen the risk of delayed sleep in case you are working in front of the screen at night. 

How does RedShift work?

In the early morning, redshift allows your eyes to gradually adapt over a period of about an hour, as the temperature transitions smoothly from night time until the day. 

The color temperature during the day should match the light from outside, typically around 5500K-6500K. The default daytime temperature is 6500K.

At night the color temperature is set to match the lamps in the room. 

This temperature is around 3000K-4000K. The default night temperature is 4500K.

To install RedShift on Ubuntu:

1. The most straightforward of installing redshift on Ubuntu 20.04 is using the apt package manager. To install Redshift, execute the following commands:

$ sudo apt update
$ sudo apt install redshift redshift-gtk

Install Android File Transfer for Linux on Ubuntu 20.04 LTS - Step by Step Process ?

This article covers how to install Android File Transfer for Linux on your Ubuntu distribution.

Now you can conveniently transfer files between your android phones and Linux system.
Android File Transfer is an MTP client tool that is used to transfer files from android devices to Linux OS and from Linux OS to Android devices.
It is similar to Android File Transfer that is available for Mac OS and has a very minimalistic and easy to use interface.

To Android file transfer for Linux:
1. Connect your Android device with your computer using a USB cable.

When prompted on Android device for allowing access to the device data, tap on Allow to allow access.
2. Launch Terminal by pressing Ctrl+Alt+T key shortcut.
Then you will need to update our system by adding the PPA to your list of software sources. For this, run the following command in Terminal:

$ sudo add-apt-repository "deb http://ppa.launchpad.net/samoilov-lex/aftl-stable/ubuntu artful main"

3. Once completed, run the following command in Terminal to update the repository.

$ sudo apt-get update

4. After your local repository is updated, run the following command in Terminal to install Android file transfer:

$ sudo apt install android-file-transfer

Install Imagemagick on Linux Mint 20 - Step by Step Process ?

This article covers how to install Imagemagick on your system very conveniently and use it for editing your images.
However, you can also uninstall this tool from your system very easily at any time by following the tip that we have shared.
ImageMagick is a free and open-source application through which we can manage (i.e. create/edit/convert etc.) raster graphics. ImageMagick is typically used from command line.
Also we can use it from any programming language by using its interface like Magick.NET (.Net),IMagick (PHP), PerlMagick (Perl) etc.

To Install ImageMagick on Ubuntu 20.04 LTS:
1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.

$ sudo apt update
$ sudo apt upgrade

2. Install ImageMagick on Ubuntu system.

$ sudo apt install imagemagick

Check Disk Usage Using Duf Command-line Utility on Linux

This article covers how To View Disk Usage With Duf On Linux And Unix.

Duf is a command line utility to find disk usage in Linux and Unix-like systems.
It displays the disk usage details in a nice tabular-column and user-friendly layout.
You can even get the disk usage output in JSON format as well.

Features of duf Utility:
1. Easy to use
2. Colorful display
3. Adjust height and width as per your terminal resize movement
4. Sorting data as per our need
5. Filters and groups
6. JSON outputs and more

On DEB-based systems such as Debian, Ubuntu, Linux Mint, download the .deb binary installation file from the releases page and install it using your system's package manager.

$ sudo apt install gdebi
$ sudo gdebi duf_0.3.1_linux_amd64.deb

On RPM-based systems such as RHEL, CentOS, Fedora, download the .rpm binary file and install it using command:

$ sudo rpm -Uvh 

To View Disk Usage With Duf On Linux And Unix:
All you have to do is just run the duf command without any options like below:

$ duf

Install Moodle on Red Hat Enterprise Linux 8 - Step by Step Process ?

This article covers how to download, configure, and install Moodle powered by the LAMP stack on RHEL 8.

Moodle is the world’s most popular learning management system for building robust online learning sites.

How to open HTTP and HTTPS for Moodle Learning Platform in CentOS 8 ?
To open HTTP and HTTPS services in the firewall to allow traffic to the NGINX web server, run the commands below:

# firewall-cmd --permanent --zone=public --add-service=http 
# firewall-cmd --permanent --zone=public --add-service=https

# firewall-cmd --reload

Search by typing a one letter Word Term Here