Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
Debian / Ubuntu Linux apt-get: Blacklist a Package From Installing
You can blacklist a package from being installed in Debian or Ubuntu using the apt-mark command. This allows you to prevent a package from being installed, updated, or removed, even if it is specified as a dependency by another package. Here's how to blacklist a package: sudo apt- mark hold <pack
Linux / Unix: Find Out DNS Server IP Address / Names
To find out the DNS server IP addresses or names in a Unix-like operating system, you can use the nslookup command or the cat command to view the /etc/resolv.conf file. Here's how to use nslookup : nslookup google.comrn This will return the IP address of the DNS server used by the system to resolve
Unix / Linux: Maximum Character Length of Arguments In a Shell Command
The maximum length of arguments in a shell command is dependent on the underlying operating system and the system's configuration. In most cases, the maximum length of arguments in a shell command is determined by the operating system's shell and the maximum size of a command line buffer. In most Un
Synology Nas: Run Fsck To Check and Repair a Linux File System
To run the fsck utility to check and repair a Linux file system on a Synology NAS, you need to have access to the command line interface of the device. You can do this by using the ssh command to log into the NAS from a remote computer, or by using the built-in Terminal or Console feature in the Syn
CentOS Linux 5/6 Change Hostname Command
To change the hostname in CentOS 5/6, you can follow these steps: Open the /etc/sysconfig/network file in a text editor: sudo nano /etc/sysconfig/networkrn Change the HOSTNAME value to the desired hostname: HOSTNAME=new_hostnamern Save the file and close the editor. Restart the network service to ap
TCSH / CSH Shell Set PATH Variable
To set the PATH environment variable in the TCSH/CSH shell, you can use the following syntax: n n n set path = (dir1 dir2 dir3 ...) n n n Replace dir1 , dir2 , dir3 , etc., with the directories you want to include in the PATH . For example, to add the /usr/local/bin directory to the PATH , you can u
Unix Create a File Command
To create a file in Unix, you can use the touch command. The touch command allows you to create an empty file with a specified name. Here's the basic syntax: touch file_namern Replace file_name with the desired name for the new file. For example, to create a file named example.txt , you can use the
Linux List All Environment Variables Command
You can use the following command to list all environment variables in Linux: printenv rn This will display a list of all the environment variables and their values. To view a specific environment variable, you can use the following syntax: echo $VARIABLE_NAME rn Replace VARIABLE_NAME with the name
Ubuntu / Debian Linux Install Keychain SSH Key Manager For OpenSSH
To install Keychain on Ubuntu/Debian Linux, you can follow these steps: n n Update the package list: n n n n sudo apt - get update n n n n Install Keychain: n n n n sudo apt- get install keychain n n n n Add the following lines to your shell profile file (e.g., ~/.bashrc , ~/.bash_profile , or ~/.zs
Linux Find Out What Compilers Are Installed or Available On The System
You can use the following commands to find out what compilers are installed or available on a Linux system: gcc -v : This will display information about the version of the GCC (GNU Compiler Collection) compiler that is installed, if any. whereis cc : This will show the location of the cc compiler, w
Linux / Unix: sed Command Print Only Matching Lines
In Linux or Unix, you can use the sed command to print only the lines that match a specific pattern. Here's the basic syntax: sed -n '/pattern/p' filern -n - tells sed to not print any lines by default /pattern/ - specifies the pattern to match p - tells sed to print the lines that match the pattern
HowTo: Revoke OpenSSH Keys and Disable User Access
To revoke OpenSSH keys and disable user access, you need to remove the user's public key from the authorized keys file and remove their private key from their client. Here are the steps to do this: On the server, locate the user's authorized keys file. It's usually located in the ~/.ssh directory. R
VIM Find And Replace All Text Substitute Command
In Vim, you can use the :%s/old-text/new-text/g command to replace all occurrences of "old-text" with "new-text" in the entire file. Here's a breakdown of the command: : - begins a Vim command line % - represents all lines in the file s - stands for substitute old-text - the text you want to replace
HowTo: Use Grep Command In Unix / Linux To Search Subdirectories
To use the grep command to search for a pattern in all subdirectories of a directory in Unix or Linux, you can use the -r or --recursive option, followed by the directory path, the pattern you want to search for, and the file types you want to search in (if any). Here's an example of using the gr
Linux dd Command Show Progress Copy Bar With Status
To show the progress bar with status while using the dd command in Linux, you can use the pv utility. Here's an example of how you can pipe the output of dd to pv :rn rn rn dd if = /dev/ sda | pv | dd of = /dev/ sdbrn rn rnThis will show a progress bar with the transfer rate, time elapsed, and estim
PHP Warning: fread(): Length parameter must be greater than 0 in setoptions.php on line 311 Error and Solution
The "PHP Warning: fread(): Length parameter must be greater than 0" error message is typically thrown when the fread() function in PHP is passed an argument of zero or a negative number as the length of data to be read from a file. The fread() function expects a positive integer as the length parame
Linux AWS: Find And Delete All Files Securely So That No One Can Recover It Ever
To securely delete all files in Linux AWS, you can use the shred command. Shred overwrites the file contents multiple times, making it difficult to recover the data. n To delete all files in a directory, you can use the following command: n n n find /path/to/directory - type f - exec shred -uvz {} +
Ubuntu Linux Add Static Route
To add a static route in Ubuntu Linux, you need to edit the /etc/network/interfaces file and add a line to define the static route. For example, to add a static route for the network 192.168.1.0/24 via the gateway 192.168.2.1 , you would add the following line to the /etc/network/interfaces file:
Linux / Unix Find and Delete All Empty Directories & Files
To find and delete all empty directories and files in Linux or Unix, you can use the find command with the -empty option. For example, to delete all empty files and directories in the current directory:rn rn rn find . - empty - delete rn rn rnOr, to delete all empty directories in the current dir
Grep Include Only *.txt File Pattern When Running Recursive Mode
To use grep to include only *.txt file patterns when running in recursive mode, you can use the -r option to specify recursive search and the --include option to specify the file pattern to include. For example:rn rn rn grep -r 'pattern' --include= '*.txt' /path/to/directoryrn rn rnThis will sear
2,685 guides published.
