Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
How to find if a website using gzip / deflate compression using curl on Linux and Unix
You can use the curl command to check if a website is using gzip or deflate compression. The curl command will send an HTTP request to a website and display the headers in the response. You can then look for the Content-Encoding header to see if the website is using gzip or deflate compression. H
Lighttpd: Set Cache-Control: public, max-age Headers For Caching Purpose
To set Cache-Control: public, max-age headers for caching purposes in Lighttpd, you need to modify the configuration file. The default configuration file is usually located at /etc/lighttpd/lighttpd.conf . To set the Cache-Control headers, add the following to your Lighttpd configuration file:rn
Linux / Unix Rsync Copy Hidden Dot Files and Directories Only
To copy only hidden dot files and directories using rsync , use the --include option with a pattern to match hidden files, and the --exclude option with a pattern to exclude all other files: n n n rsync -av -- include = '.*/' --exclude= '*' source_directory/ destination n n n Here’s what each
Linux / Unix: Sed / Grep / Awk Print Lines If It Got 3 Words Only
You can use a combination of the sed , grep , and awk utilities to print lines that contain only 3 words. Here are examples of how you can do this using each utility:rn rn sed : The following sed command prints lines that contain exactly 3 words: rn rn rn rn sed -n '/\ b \w\+\ b \ b \w\+\ b \ b \w\+
Python Execute Unix / Linux Command Examples
In Python, you can execute Unix/Linux commands using the subprocess module. The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. n Here are some examples of how you can use the subprocess module to execute Unix/Linux comma
tar and rsync: Archive and Preserve SELinux Contexts, Extended Attributes, And ACLs
Both tar and rsync can be used to archive and preserve SELinux contexts, extended attributes, and ACLs when backing up or transferring files on a Linux system. Here's how you can use each utility:rn rn tar : To preserve SELinux contexts, extended attributes, and ACLs when using tar , you can use the
CentOS / RHEL: Install atop (Advanced System & Process Monitor) Utility
The atop utility is an advanced system and process monitor for Linux that provides detailed information about system resource utilization. To install atop on CentOS or Red Hat Enterprise Linux (RHEL), you can follow these steps: n n Add the EPEL repository: atop is not included in the default CentOS
How To Listen Pandora In Europe Outside USA Using Proxy
Pandora is a popular music streaming service that is only available in the United States. To listen to Pandora in Europe or any other region outside the US, you will need to use a proxy service. A proxy service routes your internet traffic through a server located in the US, making it appear as if y
How To Install Python idle IDE On Linux Operating System
To install the Python IDLE Integrated Development Environment (IDE) on a Linux operating system, you can use the package manager of your Linux distribution. Here are the commands for a few popular Linux distributions: On Fedora:rn rn rn sudo dnf install python3-toolsrn rn rnOn CentOS/RHEL:rn rn r
yum Command: List The Contents (Files) Of A Package on Linux
To list the contents (files) of a package in Linux using yum, you can use the following command:rn rn rn yum list < package -name>rn rn rnThis will show you a list of packages available in your repositories that match the specified package name. Once you have identified the correct package, yo
RHN yum command: Unable to read consumer identity Warning and Solution
The “Unable to read consumer identity” error message in yum command when using Red Hat Network (RHN) usually indicates that yum is unable to locate the necessary information to identify the system and its entitlements. This can happen if the RHN subscription has not been properly set up
Linux / Unix vi / vim: Open and Switch Between Multiple Files
To open multiple files in vi/vim editor, you can use the following command:rn rn rn vim file1 file2 file3rn rn rnOnce you have multiple files open, you can switch between them using the following commands:rn rn rn :n # go to the next file rn :N # go to the previous file rn :bn # go to the next file
HowTo: Use Auto Config Proxy PAC File For Specific Domain
A Proxy PAC (Proxy Auto-Configuration) file is used to configure proxy settings for a web browser. If you want to use a PAC file to configure proxy settings for a specific domain, you can use the following steps:rn rn Create a PAC file: rn rn rn rn function FindProxyForURL ( url, host ) {rn if ( shE
HowTo: Test a Proxy PAC File Syntax With Syntax Checker
A Proxy PAC (Proxy Auto-Configuration) file is used to configure proxy settings for a web browser. The file specifies the rules for determining which proxy server(s) to use for which URL(s). To test the syntax of a Proxy PAC file, you can use a PAC file syntax checker, such as the one provided by
Ubuntu Linux: Disable Apparmor For Specific Profile / Service Such As Mysqld Server
To disable AppArmor for a specific profile, such as the MySQL server, on Ubuntu Linux, you can use the following steps:rn rn Stop the service that is protected by the profile you want to disable: rn rn rn rn sudo service mysqld stop rn rn rn rn Disable the AppArmor profile for the service: rn rn rn
CentOS / RHEL: Install vnStat Network Traffic Monitor To Keep a Log Of Daily Traffic
To install vnStat, a network traffic monitor, on CentOS or RHEL, you can use the following steps:rn rn Install the vnstat package: rn rn rn rn sudo yum install vnstatrn rn rn rn Start the vnstat daemon and enable it to start automatically at boot time: rn rn rn rn sudo systemctl start vnstatrnsudo s
CentOS / RHEL: View Vnstat Graphs Using PHP Web Interface Frontend
To view vnstat graphs using a PHP web interface frontend on CentOS or RHEL, you can use the vnstat-php frontend. Here are the steps to install and configure vnstat-php: n n Install the vnstat package: n n n n sudo yum install vnstat n n n n Install the Apache web server and PHP: n n n n sudo yum ins
HowTo: Linux Rename a RAID Array From md0 to md2
To rename a Linux RAID array from md0 to md2 , you can follow these steps: n n Stop the RAID array: n n n n sudo mdadm --stop /dev/md0 n n n n Create a new RAID array with the desired name: n n n n sudo mdadm --create /dev/md2 --level =<RAID_level> --raid-devices =<number_of_devices> <
CentOS/RHEL 6: Shutdown Command
The shutdown command is used to shut down a CentOS 6 or RHEL 6 system. Here are a few examples of how to use the shutdown command:rn rn To shut down the system immediately: rn rn rn rn sudo shutdown -h nowrn rn rn rn To shut down the system after a specified delay: rn rn rn rn sudo shutdown -h +&
Unix / Linux: Bash Number Currency Formatting Thousands Grouping Separator
In a bash shell, you can format numbers with a currency-style thousands grouping separator by using the printf command with the %' format specifier. For example, to format a number with a comma as the thousands grouping separator, you can use the following syntax:rn rn printf "%'d " <number>
2,685 guides published.
