×


Blog


Python List pop() Method - Explained with Examples

This article covers how to use the pop() method in Python. In fact, the pop() method removes the item at the given index from the list and returns the removed item.


pop() function parameters:

  • The pop() method takes a single argument (index).
  • The argument passed to the method is optional. If not passed, the default index -1 is passed as an argument (index of the last item).
  • If the index passed to the method is not in range, it throws IndexError: pop index out of range exception.


Return Value from pop()

The pop() method returns the item present at the given index. This item is also removed from the list.


iostat Command in Linux - Explained with examples

This article covers how to use the iostat command in Linux. In fact, iostat command is used to monitor CPU utilization and I/O (input /output) statistics of all the disks and file systems. nfsiostat command is used to monitor i/o statistics of network file system(NFS).


iostat command generally generates two reports:

  • CPU utilization report.
  • All disks i/o statistics report.


To generate the reports, iostat command reads some of the system files . These files are:

  • /proc/diskstats for disk stats.
  • /proc/stat for system stats.
  • /sys for block device stats.
  • /proc/devices for persistent device names.
  • /proc/self/mountstats for all  the network filesystems.
  • /proc/uptime for information regarding system uptime.


namei Command in Linux System - Explained with Examples

This article covers how to use the namei command in Linux.


The namei command in Linux follows a pathname until a terminal point is found. Following is its syntax:

$ namei [options] pathname...

And here's what the man page says about this tool:

  • namei :interprets  its  arguments as pathnames to any type of Unix file (symlinks, files, directories, and so forth).  namei then follows  each pathname  until  an  endpoint  is  found (a file, a directory, a device node, etc).  If it finds a symbolic link, it shows the link, and starts following it, indenting the output to show the context.
  • This  program is useful for finding "too many levels of symbolic links" problems.


Backup Your Data on Ubuntu 20.04 using Fwbackups - Step by step guide ?

This article covers how to install fwbackups and backup data in the application on Ubuntu 20.04. In fact, fwbackups is an open-source feature-rich user backup application that allows you to backup your important documents anytime, anywhere using a simple powerful interface with the support for scheduled backups and backing up to remote systems.


How to Install fwbackups on Debian and Ubuntu / Mint Linux ?

1. Install these following dependencies on your system:

$ sudo apt-get install gettext autotools-dev intltool python-crypto python-paramiko python-gtk2 python-glade2 python-notify cron

2. Then download fwbackups to your home directory using wget command and install it from source using the following commands:

$ wget http://downloads.diffingo.com/fwbackups/fwbackups-1.43.7.tar.bz2
$ tar xfj fwbackups-1.43.7.tar.bz2
$ cd fwbackups-1.43.7/
$ ./configure --prefix=/usr
$ make && sudo make install

3. Install fwbackups on CentOS and RHEL:

$ sudo yum install gettext autotools-dev intltool python-crypto python-paramiko python-gtk2 python-glade2 python-notify cron

4. Next, download fwbackups and install it from source using the following commands:

$ wget http://downloads.diffingo.com/fwbackups/fwbackups-1.43.7.tar.bz2
$ tar xfj fwbackups-1.43.7.tar.bz2
$ cd fwbackups-1.43.7/
$ ./configure --prefix=/usr
$ make && sudo make install

5. Install fwbackups on Fedora Linux:

$ sudo dnf install fwbackups


From the fwbackups Overview page, you can simply click on any one of the toolbar buttons to begin:

  • ⁠Backup Sets – To create, edit or delete backup sets as well as manually create a backup set.
  • ⁠One-Time Backup – Create "one-time" backups.
  • ⁠Log Viewer – Shows the information about fwbackups's activities.
  • Restore – Allows you to restore any backup from previously made backup.

How to install Bacula Server on Ubuntu Linux system ?

In order to install Bacula Server, log in to your Ubuntu instance and issue the command:

$ sudo apt-get install bacula -y

You will be prompted for the following:

  • Mail server configuration (unless you need email alerts, you can configure this as local only).
  • System mail name (this is the email domain for the server, if applicable).
  • Configure database for bacula-directory-pgsql (you want to do this and set it as localhost).
  • Configure a password for the Bacula PostgreSQL database.


Once you've completed the above, you'll get your prompt back and can continue on with the configuration.


Linux wget Command - Explained with Examples

This article covers the wget command which downloads files served with HTTP, HTTPS, or FTP over a network. In fact, Wget is a free GNU command-line utility tool used to download files from the internet. It retrieves files using HTTP, HTTPS, and FTP protocols.



Wget command options includes:

  • -V, --version: Display the version of wget, and exit.
  • -h, --help: Print a help message describing all the wget's command-line options, and exit.
  • -b, --background: Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log.
  • -e command,
  • --execute command: Execute command as if it were a part of the file .wgetrc. A command thus invoked is executed after the commands in .wgetrc, thus taking precedence over them.


How to Check if wget is Installed?

To check, open the terminal window and type in:

$ wget

If the output displays wget command not found you need to download and install the tool manually. Below you will find the installation instructions for Ubuntu/Debian, CentOS, and Windows.

To install wget on Ubuntu or Debian releases, use the command:

$ sudo apt-get install wget

To install wget on CentOS or Fedora, type the following command:

$ sudo yum install wget


How to Install wget on Windows ?

  • Download wget for Windows and install the package.
  • Add the wget bin path to environment variables (optional). Configuring this removes the need for full paths, and makes it a lot easier to run wget from the command prompt:
  • Open the Start menu and search for "environment".
  • Select Edit the system environment variables.
  • Select the Advanced tab and click the Environment Variables button.
  • Select the Path variable under System Variables.
  • Click Edit.
  • In the Variable value field add the path to the wget bin directory preceded by a semicolon (;). If installed in the default path, add C:Program Files (x86)GnuWin32bin.
  • Open the command prompt (cmd.exe) and start running wget commands.


Enable Cookies on Google Chrome - Step by step guide ?

This article covers the procedure of enabling the cookies on Google Chrome on a Linux Mint 20 system. In fact, you will be able to enable the cookies of your Google Chrome browser instantly and hence you will be able to personalize your browsing experience in a better way. 


How to Turn cookies on or off on a browser (like Chrome or Safari) ?

  • On your computer, open Chrome.
  • At the top right, click More More and then Settings.
  • Under "Privacy and security", click Site settings.
  • Click Cookies.
  • From here, you can: Turn on cookies: Next to "Blocked," turn on the switch and Turn off cookies: Turn off Allow sites to save and read cookie data.


Why cookies are helpful on Google Chrome ?

Cookies are files created by sites you visit. They make your online experience easier by saving browsing information. With cookies, sites can:

  • Keep you signed in.
  • Remember your site preferences.
  • Give you locally relevant content.