Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
Linux / UNIX: Bash Script Sleep or Delay a Specified Amount of Time
To sleep or delay a specified amount of time in a bash script, you can use the sleep command. This command takes the number of seconds to wait as an argument. For example, to sleep for 5 seconds:rn rn rn #!/bin/bash # Sleep for 5 seconds rn sleep 5rn rn rnIn some cases, you might need to sleep
Linux: Extract Audio From Video File (Video To Mp3)
To extract audio from a video file and convert it to an MP3 format in Linux, you can use a tool like FFmpeg. Here's an example command that will convert a video file named "video.mp4" to an MP3 file named "audio.mp3":rn rn rn ffmpeg - i video .mp4 -vn -acodec libmp3lame -ac 2 -ab 160 k -ar 48000
How to use scp/rsync to copy file with a colon (:) in it
To copy a file that has a colon (:) in its name using scp or rsync , you need to escape the colon with a backslash ( \ ). For example, if you want to copy a file named file:1 from a remote host example.com to the current directory on your local machine, you would run:rn rn rn scp user @example .
Linux: Iptables Find / Check Banned IP Address
To find out if an IP address is banned in Linux using iptables, you can use the following command:rn rn rn iptables -nL --line-numbers | grep <IP address >rn rn rnThis will show you the list of rules in the iptables firewall and highlight the line containing the specified IP address. If the IP
How to find out CPU information on CentOS Linux 7.x/8.x/Stream
To find out the CPU information on CentOS 7.x/8.x/Stream, you can use the following commands:rn rn lscpu: This command provides detailed information about the CPU architecture and the number of processors, cores, and threads. rn rn rn rn $ lscpurn rn rn rn cat /proc/cpuinfo: This command displays in
Bash Shell: Extract Digits From a String
If you want to extract digits from a string in bash, you can use the following methods:rn rn Using grep: rn rn rn rn string = "abc123def456" rndigits=$( echo $string | grep -o ' \+' )rn echo $digits rn rn rnOutput:rn rn rn 123456rn rn rn rn Using sed: rn rn rn rn string = "abc123def456" rndigits=$(
Debian / Ubuntu Linux Disable / Remove All NFS Services
To disable or remove all NFS services on Debian/Ubuntu Linux, you can use the following steps:rn rn Stop the NFS server service: rn rn rn rn sudo service nfs-kernel-server stop rn rn rn rn Disable the NFS server service from starting automatically during boot: rn rn rn rn sudo update-rc.d nfs-kernel
How do I show lines in vi or vim text editor?
To show lines in the vi or vim text editor, you can enable line numbers by using the following command:rn rn rn : set numberrn rn rnThis will display line numbers in the editor, and you can turn off line numbers by using the following command:rn rn rn : set nonumberrn rn rnAlternatively, you can ena
HowTo: Linux Random Password Generator Command
The easiest way to generate a random password in Linux is to use the "openssl" command. The following command will generate a 12-character random password:rn rn rn openssl rand - base64 12rn rn rnThis generates a random string of 12 characters that is base64-encoded, which gives you a set of charact
Unix / Linux: Remove Nonempty Directory Command
To remove a non-empty directory in Unix/Linux, you can use the rm command with the -r option. This option tells rm to remove the specified directory and all of its contents, including subdirectories and files. Here's the syntax for using rm to remove a non-empty directory:rn rn rn rm -r directory
HowTo: Merge Apache / Lighttpd / Nginx Server Log Files
To merge Apache / Lighttpd / Nginx server log files, you can use the cat command in Linux/Unix. The cat command allows you to concatenate and display the contents of multiple files. Here's how you can use the cat command to merge log files:rn rn rn cat file1. log file2. log > merged_logs. log
Perl Command To List Installed CPAN Modules
To list the installed CPAN modules in Perl, you can use the following command:rn rn rn perl -MCPAN -e 'my $c = CPAN::Shell -> expand ( "Module" , "/./" ); print join " " , map { $_ -> id } sort { $a -> id cmp $b -> id } $c;'rn rn rnThis will list all the installed CPAN modules in alphabe
OpenBSD: Install nmap Network Port Scanner Security Tool
To install Nmap on OpenBSD, you can use the package manager, pkg_add. Here's the steps:rn rn Update the package repositories by running the following command: rn rn rn rn # pkg_add -u rn rn rn rn Install Nmap by running the following command: rn rn rn rn # pkg_add nmap rn rn rnOnce the installation
FreeBSD Install VMWare Guest Tools
Installing VMware Guest Tools in a FreeBSD virtual machine involves the following steps:rn rn Download the appropriate VMware tools for your version of FreeBSD. rn Extract the tools archive to a directory of your choice. rn Open a terminal window in the directory where you extracted the tools. rn Mo
FreeBSD: The search target requires INDEX-9. Please run make index or make fetchindex
The "The search target requires INDEX-9. Please run make index or make fetchindex" error message in FreeBSD indicates that the necessary index for the ports collection is missing. This error occurs when you run a command such as "portmaster" or "portupgrade" without the necessary index. To resolv
HowTo: Unix / Linux Rename File Extension From .OLD to .NEW
To rename a file extension from .OLD to .NEW in Unix or Linux, you can use the mv (move) command along with string substitution and a shell loop. Here is an example using a shell script: n n n #!/bin/bash n for f in *.OLD; do n mv " $f " " ${f%.OLD} .NEW" n done n n n This script will loop through a
Linux Display System Statistics Gathered From /proc
The /proc file system in Linux provides information about various aspects of the system such as system statistics, process information, and hardware configuration. To display system statistics gathered from /proc, you can use the 'top' or 'free' commands. The 'top' command provides real-time info
Lighttpd Configure Subdomain
To configure a subdomain on Lighttpd, you need to add a new virtual host configuration for the subdomain in the Lighttpd configuration file. Here is the general process:rn rn Open the Lighttpd configuration file:rn rn rn sudo nano /etc/lighttpd/lighttpd.confrn rn rn Add a new virtual host configu
Linux Display Ethernet Bridge Name and Information
rn rn rn rn rn To display information about Ethernet bridges on a Linux system, you can use the brctl command. This command is used to configure and manage Ethernet bridges on the system. To display information about the Ethernet bridges on the system, you can use the following command:rn rn
How To Run Firefox From The Command Line
To run the Firefox web browser from the command line in Linux, simply open a terminal window and type "firefox" and hit enter. If the Firefox application is installed in a location that is not in your PATH, you will need to specify the full path to the binary, like this:rn rn rn /path/to/firefoxrn r
2,685 guides published.
