Htaccess (HyperText Access) is a configuration file that allows developers to overide the Apache webserver configuration at directory level. Enable .htaccess By default .htaccess is not enable, we have to change in httpd.conf (Apache) configuration file to for enable .htaccess Replace AllowOverride None to …
Read MoreA Dockerfile is a text document used to create own docker container. A Dockerfile has some commands FROM: Sets the Base Image for subsequent instructions. MAINTAINER: (deprecated - use LABEL instead) Set the Author field of the generated images. RUN: execute any commands in a new layer on top of the current image and …
Read MoreJSON (JavaScript Object Notation) is a standard file format that uses text to communicate data objects to array data types. This notation makes it easy for applications to parse and generate files. JSON grew out of the need to have a real-time server-to-web browser communication. Datatypes String Number Boolean null …
Read MoreUser management useradd [USERNAME] - Add new user useradd -G [GROUPNAME][username]- Add new user in group passwd [USERNAME] - User account is locked until you set a password with the passwd command usermod -a -G [GROUPNAME][username] - Add user in group userdel [USERNAME] - Remove the existing user cat /etc/passwd | …
Read MoreCrontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times Commands crontab -e - Edit your crontab file, or create one if it doesn’t already exist. crontab -l - Display your crontab file. crontab -r - Remove your crontab file. crontab -v - Display the last time you …
Read Morebasic 'find file' commands 1find / -name foo.txt -type f -print # full command 2find / -name foo.txt -type f # -print isn't necessary 3find / -name foo.txt # don't have to specify "type==file" 4find . -name foo.txt # search under the current dir 5find . -name "foo.*" # wildcard 6find . -name …
Read MoreOptions Description -c This prints only a count of the lines that match a pattern -h Display the matched lines, but do not display the filenames. -i Ignores, case for matching -l Displays list of a filenames only. -n Display the matched lines and their line numbers. -v This prints out all the lines that do not matches …
Read MoreShebang On Linux, a shebang #! is a special line at the beginning of a script that tells the operating system which interpreter to use when executing the script. This line, also known as a “sharp-exclamation”, “sha-bang”, “hash-bang”, or “pound-bang”, is the first line of a dash and starts with #! followed by the path …
Read MorePresented below is an illustrative shell script for managing MySQL databases. This script facilitates the creation of databases and the establishment of users with customized access permissions. Please feel free to utilize this script wherever it may be required. Example 1#!/bin/bash 2# VARIABLES 3# 4_bold=$(tput bold) …
Read MoreProvided below is an example script designed to dynamically back up a MySQL database hosted within a Docker environment. The backup is subsequently pushed to an AWS S3 bucket. Feel free to utilize this script for your database backup requirements. MySQL Backup and Push to S3 Bucket 1#!/bin/bash 2 …
Read More