This config shows some examples of find command allowing you to exclude directories explicitly from its search. Below you can find our sandbox directory containing multiple directories and files:
.
├── dir1
│   ├── dir2
│   │   └── dir3
│   │       └── file2
│   └── file1
├── dir4
│   └── file3
└── dir5
    └── dir6
        ├── dir4
        │   └── file4
        └── file4

7 directories, 5 files

VirtualBox virtualization software allows you to install any operation system directly to any attached block device such as USB stick/drive etc. This is actually a cool way to create you personalized Live Linux USB stick. This short "howto" describes how it works.
For the sake of this tutorial we will be using block device file name /dev/sdb to refer to our attached USB drive. First we need to create a raw vmdk virtual file disk linked to our /dev/sdb USB drive. As a privileged user execute the below command:
# vboxmanage internalcommands createrawvmdk -filename linux-live.vmdk -rawdisk /dev/sdb

About

The automated build docker Mediawiki system (CMS) image “linuxconfig/mediawiki” can be used to instantly deploy Mediawiki on your docker hosts.

Configuration

The Mediawiki runs on Debian GNU/Linux system featuring Apache web server, MariaDB ( MySQL ), database and PHP5. A new docker container based on “linuxconfig/mediawiki” will expose port 80 which can be linked to the docker host port for an immediate Mediawiki web configuration/installation access.

From time to time you may want to backup your files directly to Amazon S3 storage without the middle step of saving your backup compressed file to a local disk. This is especially important if you have a limited disk space on your local drive/server. The below commands assume that you have already installed and configured s3cmd tool on your server. The bucket name we are going to use for our examples is called backup. Let's start with a regular backup creating a local file.
$ tar cPf /tmp/lubos.tar /home/lubos
$ s3cmd put /tmp/lubos.tar s3://backup/lubos.tar

dig command is a very useful DNS lookup utility. It can be used to retrieve DNS records information of any domain name by querying specifc DNS servers. It is also a great troubleshooting tool for any admin configuring or troubleshooting existing DNS server.

To retrieve domain MX records simply use MX option in combination to domain name you wish to query. For example the below command will query MX records for google.com:

About

The trusted docker image of Backdrop content management framework “linuxconfig/backdrop” can be used to instantly deploy Backdrop on your docker hosts.

Configuration

The backdrop application runs on Debian GNU/Linux system featuring Apache web server, MariaDB ( MySQL ), database and PHP5. A new docker container based on “linuxconfig/backdrop” will expose port 80 which can be linked to the docker host port for an immediate backdrop blog access.

Configured MySQL users:passwords:
  • root:"empty password"
  • admin:"pass"
Configured MySQL databases:
  • backdrop
Exposed ports:
  • 80

Deployment

The below command will download and create a new docker container called backdrop and link local host system port 80 with container's exposed port 80.
# docker run -d --name=backdrop -p 80:80 linuxconfig/backdrop

In this config you will learn how to install Raspbian Linux on your Raspberry Pi computer. Here is a what do you need checklist:
  • SD or miniSD card depending on your raspberry PI Hardware version
  • Wired connection to your router, set with DHCP and Internet connection
Next, install wget and bzip2 packages on your system:
UBUNTU/DEBIAN
# apt-get install bzip2 wget
FEDORA/CENTOS
# yum install bzip2 wget

The following config will few examples on how to quickly search a filesystem for files based on file extension. For this we only need two command line tools find and grep. First, lets search for all files with a filename extension .sh recursively within /home/ directory:
$ find ~/ -type f | grep "\.sh$"

About

The automated build docker Drupal content management framework image “linuxconfig/drupal” can be used to instantly deploy Drupal on your docker hosts.

Configuration

The Drupal application runs on Debian GNU/Linux system featuring Apache web server, MariaDB ( MySQL ), database and PHP5. A new docker container based on “linuxconfig/drupal” will expose port 80 which can be linked to the docker host port for an immediate Drupal blog access.

Configured MySQL users:passwords:
  • root:"empty password"
  • admin:"pass"
Configured MySQL databases:
  • drupal
Exposed ports:
  • 80

Deployment

The below command will download and create a new docker container called drupal and link local host system port 80 with container's exposed port 80.
# docker run -d --name=drupal -p 80:80 linuxconfig/drupal

About

The automated build docker Wordpress blogging tool and a content management system (CMS) image “linuxconfig/wordpress” can be used to instantly deploy wordpress CMS on your docker hosts.

Configuration

The wordpress CMS application runs on Debian GNU/Linux system featuring Apache web server, MariaDB ( MySQL ), database and PHP5. A new docker container based on “linuxconfig/wordpress” will expose port 80 which can be linked to the docker host port for an immediate Wordpress web site access.

Configured MySQL users:passwords:
  • root:"empty password"
  • admin:"pass"
Configured MySQL databases:
  • wordpress
Exposed ports:
  • 80

Deployment

Below command will download and create a new docker container called wordpress and link local host system port 80 with container's exposed port 80.
# docker run -d --name=wordpress -p 80:80 linuxconfig/wordpress

AUTHOR: Tobin Harding

Production C code should always check the return value of library calls for errors. However, these checks often require writing the same code repeatedly. There are a number of solutions to this problem, of which this is just one. For example
int foo (char *s)
{
	char *buf;

	if ( (buf = malloc(strlen(s) + 1)) == NULL)
	   /* error */
	...
}

XZ is another compression method used to compress data. There are several ways on how to decompress XZ archive on Linux. For a tarball XZ compressed archive first try a tar command with xf options. This way a tar command will try automatically guess a compression method. Before you run the above command firs install XZ tools:
# apt-get install xz-utils
Otherwise, you will receive error message output:
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
To extract XZ tarball run:
$ tar xf myarchive.tar.xz

In this config we will show you a number of examples how to use mcrypt tool to easily encrypt files whether the file is large or small in size. We will also use Mcrypt to encrypt and compress files and directories on the fly which can be usefully for a number of backup and scripting purposes.

Mcrypt installation

UBUNTU/DEBIAN
# apt-get install mcrypt
REDHAT/FEDORA/CENTOS
# yum install mcrypt

Creating a testing sandbox

Let's first create a directory with some files we can work with:
$ mkdir dir1
$ cd dir1/
$ echo "My File to Encrypt" > file1
$ cat file1 
My File to Encrypt
$ fallocate -l 500MB file2
$ md5sum file*
bccd44aaa84c7c9d04a268f670ae92c5  file1
4034379ecc54213fc9a51785a9d0e8e2  file2

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: