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: #!/bin/bash # Sleep for 5 seconds sleep 5 In some cases, you might need to sleep for a longer duration,
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": ffmpeg - i video .mp4 -vn -acodec libmp3lame -ac 2 -ab 160 k -ar 48000 audio .mp3
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: scp user @example . com :file\:
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: iptables -nL --line-numbers | grep <IP address > This will show you the list of rules in the iptables firewall and highlight the line containing the specified IP address. If the IP address is ban
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: lscpu: This command provides detailed information about the CPU architecture and the number of processors, cores, and threads. $ lscpu cat /proc/cpuinfo: This command displays information about the individu
Bash Shell: Extract Digits From a String
If you want to extract digits from a string in bash, you can use the following methods: Using grep: string = "abc123def456" digits=$( echo $string | grep -o ' \+' ) echo $digits Output: 123456 Using sed: string = "abc123def456" digits=$( echo $string | sed 's/ *//g' ) echo $digits Output: 123456 Usi
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: Stop the NFS server service: sudo service nfs-kernel-server stop Disable the NFS server service from starting automatically during boot: sudo update-rc.d nfs-kernel-server disable Uninstall the NFS server
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: : set number This will display line numbers in the editor, and you can turn off line numbers by using the following command: : set nonumber Alternatively, you can enable line numbers when launchin
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: openssl rand - base64 12 This generates a random string of 12 characters that is base64-encoded, which gives you a set of characters that are sa
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: rm -r directory_name For e
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: cat file1. log file2. log > merged_logs. log In the abov
Perl Command To List Installed CPAN Modules
To list the installed CPAN modules in Perl, you can use the following command: perl -MCPAN -e 'my $c = CPAN::Shell -> expand ( "Module" , "/./" ); print join " " , map { $_ -> id } sort { $a -> id cmp $b -> id } $c;' This will list all the installed CPAN modules in alphabetical order. To
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: Update the package repositories by running the following command: # pkg_add -u Install Nmap by running the following command: # pkg_add nmap Once the installation is complete, you can start using Nmap by typing "
FreeBSD Install VMWare Guest Tools
Installing VMware Guest Tools in a FreeBSD virtual machine involves the following steps: Download the appropriate VMware tools for your version of FreeBSD. Extract the tools archive to a directory of your choice. Open a terminal window in the directory where you extracted the tools. Mount the virtua
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 resolve t
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: #!/bin/bash for f in *.OLD; do mv " $f " " ${f%.OLD} .NEW" done This script will loop through all files with a .O
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 informa
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: Open the Lighttpd configuration file: sudo nano /etc/lighttpd/lighttpd.conf Add a new virtual host configuration for the subdomain
Linux Display Ethernet Bridge Name and Information
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: brctl show This will show i
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: /path/to/firefox You can als
2,685 guides published.
