Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
Shell Scripting: Check File Size ( Find File Size )
In shell scripting, you can check the size of a file using the stat command. The stat command displays file or file system status, including file size, in a user-readable format. Here's an example shell script that uses stat to find the size of a file:rn rn rn #!/bin/bash filename= "/path/to/
UNIX / Linux: Explain The Nine Permissions Bits On Files
In UNIX and Linux, there are nine permission bits that determine the access permissions on a file. The permissions are divided into three groups of three bits each, representing the owner, group, and others. Here's what each bit represents:rn rn Read (r): The file can be read. rn Write (w): The file
Disable GNOME Automounting
To disable GNOME automounting in Linux, you can use the following steps:rn rn Open the GNOME configuration editor by running the command gconf-editor in the terminal. rn Navigate to the following key: /desktop/gnome/volume_manager . rn Uncheck the automount and automount_open options. rn Close the c
Linux / UNIX Find All World-Writable Directories Have Sticky Bits Set
To find all world-writable directories that have the sticky bit set in Linux/UNIX, you can use the find command. The sticky bit is represented by the letter "t" in the permission bits for a directory. A directory that has the sticky bit set can only be deleted by its owner, even if it is world-wr
Linux / UNIX Automatically Logout BASH / TCSH / SSH Users After a Period of Inactivity
On Linux/UNIX systems, you can configure the shell or SSH server to automatically log out users after a period of inactivity using the TMOUT environment variable. To automatically log out users after a period of inactivity, you can set the TMOUT variable in the user's shell configuration file. Fo
UNIX Cat All Files In A Directory
To concatenate all files in a directory using the cat command on a UNIX system, you can use a wildcard character to match all files in the directory, then redirect the output to a new file. The command would look something like this: n n n cat /path/to/directory/* > combined_file.txt n n n This c
Where Are MySQL Files Stored in a UNIX / Linux Harddisk
In a typical installation of MySQL on a UNIX or Linux system, the files are usually stored in several different locations on the hard disk.rn rn Configuration files: The main configuration file for MySQL is usually located at /etc/my.cnf or /etc/mysql/my.cnf , depending on the distribution. rn Binar
SSH Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys2
The error message “Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys2” indicates that there is a problem with the permissions of the authorized_keys file on the server. n To fix this error, you need to adjust the ownership and permissions of the auth
Redhat / CentOS: ImageMagick Installation command
To install ImageMagick on Redhat and CentOS systems, follow these steps:rn rn Open a terminal window. rn Update the package list:rn rn rn sudo yum update rn rn rn Install ImageMagick:rn rn rn sudo yum install ImageMagickrn rn rn Verify the installation by checking the version of ImageMagick:rn rn rn
Debian Linux Install GNU GCC Compiler and Development Environment
To install the GNU GCC compiler and development environment on Debian Linux, follow these steps:rn rn Open a terminal window. rn Update the package list:rn rn rn sudo apt - get update rn rn rn Install the GCC compiler and development environment:rn rn rn sudo apt- get install build-essentialrn rn rn
Linux Disable Core Dumps
A core dump is a file that contains the memory image of a process when it crashes. By default, core dumps are enabled on most Linux distributions. However, in some cases, you may want to disable core dumps to save disk space or to prevent sensitive data from being written to disk. Here's how to d
Use BASH nullglob To Verify *.c Files Exists or Not In a Directory
In Bash, you can use the nullglob option to verify if any files with a specific pattern exist in a directory or not. The nullglob option causes the shell to expand patterns to an empty list if no matches are found. Here's how you can use the nullglob option to verify if *.c files exist in a director
Linux Iptables Just Block By Country
Blocking traffic from specific countries using iptables can be challenging as IP addresses are not directly tied to a specific country. However, there are several services and databases that provide geo-location information about IP addresses. One way to block traffic from specific countries usin
Redhat Linux yum grouplist and groupinstall Option Not Working
If the yum grouplist and yum groupinstall commands are not working on Redhat Linux, there are a few possible reasons and solutions:rn rn Make sure that the yum package manager is installed on your system. You can check this by running the following command:rn rn rn rpm - q yumrn rn rnIf yum is not i
Linux Iptables Allow NFS Clients to Access the NFS Server
To allow NFS clients to access an NFS server using iptables on Linux, you need to configure the firewall to allow traffic on the appropriate ports. NFS uses a combination of UDP and TCP, so you will need to open both types of traffic. Here are the steps to allow NFS clients to access the NFS serv
CentOS or Redhat Enterprise Linux
CentOS and Red Hat Enterprise Linux (RHEL) are two closely related operating systems. CentOS is a community-driven, free and open-source Linux distribution that is built from the same source code as RHEL, but without the branding and licensed components. RHEL is a commercial Linux distribution th
CentOS Add Route Command
To add a static route in CentOS, you can use the ip route add command. The syntax of the command is as follows: n n n sudo ip route add destination_network/subnet_mask via gateway_ip n n n Where: n n destination_network/subnet_mask : Specifies the destination network and subnet mask in CIDR notation
Postfix Configure Client SMTP Authentication ( Smarthost Authentication )
To configure client SMTP authentication (also known as smarthost authentication) in Postfix, follow these steps:rn rn Install the sasl2-bin package if it's not already installed:rn rn rn sudo apt-get install sasl2- bin rn rn rn Create a new file in /etc/postfix/sasl directory for the authentication
Postfix Configure Multiple ISP Client SMTP Authentication
If you have multiple ISPs and want to use their respective SMTP servers for sending mail from your Postfix server, you can configure authentication for each ISP separately. Here's how you can set up SMTP authentication for multiple ISPs in Postfix:rn rn Install the sasl2-bin package if it's not alre
Bash Shell Temporarily Disable an Alias
To temporarily disable an alias in the Bash shell, you can use the \ (backslash) character before the command that the alias points to. This tells the shell to use the actual command instead of the alias. For example, let's say you have an alias called ll that points to the ls -l command. If you
2,685 guides published.
