Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
Linux: Mount Disk Partition Using LABEL
In Linux, you can mount a disk partition using its LABEL instead of its device name. This can be useful when the device name may change (e.g. between reboots), but the LABEL remains constant. To mount a disk partition using its LABEL, you can use the -L option with the mount command, like this:rn
Bash Shell: Find Out If a Variable Is Set or Not
In bash shell, you can check if a variable is set or not using the following syntax:rn rn rn if ; then rn echo "Variable VARNAME is not set." rn else rn echo "Variable VARNAME is set to: $VARNAME " rn fi rn rn rnHere, the -z option is used with the ; then rn echo "Variable VARNAME is set to: $VARNAM
Mplayer Shuffle Command: Play Files In Random Order
The mplayer media player can be used to play files in a random order using the -shuffle option. The -shuffle option randomly selects files from a given list of files and plays them in the order specified by the random selection. Here's an example of how you can use the -shuffle option to play a l
passwd: pam_chauthtok(): conversation failure Error and Solutions
The error " passwd: pam_chauthtok(): conversation failure " can occur when attempting to change the password for a user on a Linux system. This error message indicates that there was a problem with the authentication token (password) change process, likely due to a misconfigured PAM (Pluggable Authe
memcached: Failed To Set rlimit For Open Files Error and Solution
The error " memcached: Failed to set rlimit for open files " can occur when starting the memcached service on a Linux system. This error message indicates that the memcached service is unable to set the maximum number of open files (also known as file descriptors) allowed for its process. To reso
Lighttpd: network.c:483: error: ‘EC_KEY’ undeclared (first use in this function) Error and Solution
The error " network.c:483: error: ‘EC_KEY’ undeclared (first use in this function) " when compiling the lighttpd web server usually indicates that the OpenSSL library on your system is missing the elliptic curve cryptography (ECC) support that lighttpd requires. To resolve this issue, you can try th
Linux: Reset High Speed USB Device Using ehci_hcd Error and Solution
The ehci_hcd error message can indicate that there is an issue with a high-speed USB device and its connection to the system. To reset a high-speed USB device and resolve the error, you can try the following steps:rn rn Unplug the USB device from the system. rn Run the following command to remove th
How to download a file with curl on Linux/Unix command line
To download a file using the curl command on the Linux or Unix command line, you can use the following syntax:rn rn rn curl -o rn rn rnFor example, to download the file at https://www.example.com/file.txt and save it as file.txt on your local system, you would run:rn rn rn curl https : //www.example
CentOS / RHEL: Install nmap Network Security Scanner
To install nmap on a CentOS or Red Hat Enterprise Linux (RHEL) system, you can use the following steps:rn rn Update the system: rn rn rn rn sudo yum update rn rn rn rn Install the nmap package: rn rn rn rn sudo yum install nmaprn rn rn rn Verify that nmap is installed and working by running the foll
nmap Command: Scan A Single IP Address or Host
To scan a single IP address or host using nmap , you can use the following command: n n n nmap n n n For example, to scan the host www.example.com , you would run: n n n nmap www.example.com n n n Or, to scan the IP address 192.168.1.100 , you would run: n n n nmap 192.168.1.100 n n n By default, nm
Linux Command To Shutdown HP/IBM/Sun/Dell Server System
To shutdown a HP, IBM, Sun, or Dell server system running Linux, you can use the shutdown command. The shutdown command is a standard Linux command that allows you to shut down or reboot a system. Here's an example of how to use the shutdown command to shut down the system:rn rn rn sudo shutdown
CentOS / RHEL: Remove Routes 169.254.0.0 / 255.255.0.0 From the System
To remove the route 169.254.0.0/255.255.0.0 from a CentOS or Red Hat Enterprise Linux (RHEL) system, you can use the route command. Here's an example of how to remove the route:rn rn rn route del -net 169.254 .0 .0 netmask 255.255 .0 .0 rn rn rnIn this example, the route del command is used to de
Linux / Unix curl: Pass HTTP Referer
In Linux or Unix, you can use the curl command to pass an HTTP referer when making a request. The referer is an HTTP header that specifies the URL of the previous page that linked to the current page. Here's an example of using curl to pass an HTTP referer:rn rn rn curl -H 'Referer: https://www.e
How To Install firefox-8.0.tar.bz2 in Linux
Here’s how you can install a firefox-8.0.tar.bz2 file in Linux: n n Download the firefox-8.0.tar.bz2 file to your computer. n Open a terminal window and navigate to the directory where the file is located. n Extract the contents of the tar.bz2 file using the following command: n n n n tar xjf
Bash Continue Command / Script On The Next Line
In a bash script, the continue statement is used to skip the current iteration of a loop and move on to the next iteration. It is commonly used within for or while loops to skip over certain iterations based on certain conditions. n Here’s an example of using continue in a for loop: n n n for
HowTo: Python Convert a String Into Integer
To convert a string into an integer in Python, you can use the int() function. Here's an example:rn rn rn string = "123" rn integer = int ( string )rn print ( integer )rn rn rnThis will output:rn rn rn 123rn rn rnYou can also specify the base of the number if the string represents a number in a diff
How To Run a Script In Linux
To run a Python script in Linux, follow these steps:rn rn Open a terminal window. rn Navigate to the directory where your script is located using the cd command: rn rn rn rn cd /path/to/scriptrn rn rn rn Make the script executable, if necessary, by running the following command: rn rn rn rn chmod +x
Python For Loop Examples
The for loop in Python is used to iterate over a sequence (such as a list, tuple, dictionary, set, or string) and execute a block of code for each item in the sequence. Here are some examples to help you understand how for loops work in Python:rn rn Iterating over a list: rn rn rn rn fruits = rnfor
How To Install Python On Linux 2.x/3.x latest version
To install Python on a Linux machine, follow these steps: n n Check if Python is already installed by running the following command in your terminal: n n n n python3 --version n n n If Python is already installed, you will see the version number. If not, proceed to the next step. n n Update the pack
Linux / Unix: Sort Specific Field or Column
In Linux or Unix, you can use the sort command to sort a specific field or column in a text file. The sort command sorts the input lines in a specified order, and you can control the sort order by specifying options. Here's an example to sort a file by the third field or column:rn rn rn sort -k3,
2,685 guides published.
