Linux ls Command Sort Files By Size

To sort the output of the “ls” command by file size, you can use the “ls” command with the “-S” option. The “-S” option sorts the files and directories by size, with the largest files listed first. Here’s an example of how to use the “ls” command to sort files by size: ls -lS This … Read more

Squid Proxy Server Change Outgoing IP Address

To change the outgoing IP address for a Squid proxy server, you can use the “tcp_outgoing_address” directive in the Squid configuration file. This directive specifies the IP address that Squid should use as the source address for outgoing TCP connections. Here’s how you can change the outgoing IP address for a Squid proxy server: Open … Read more

Red Hat Linux (RHEL) 5/6: Change OpenSSH Port Number

To change the OpenSSH port number in Red Hat Enterprise Linux (RHEL) 5/6, you can modify the SSH daemon’s configuration file, which is located at “/etc/ssh/sshd_config”. Here’s how you can change the OpenSSH port number: Open the “/etc/ssh/sshd_config” file using a text editor: sudo vi /etc/ssh/sshd_config Find the line that starts with “Port” and change … Read more

Linux Find Out What Process Are Using Swap Space

To find out which processes are using swap space in Linux, you can use the “top” or “pmap” command. “top” command: The “top” command provides an interactive display of system information, including a list of processes and their associated resource usage. You can use the “top” command to see the amount of swap space being … Read more

How to run shell script in Linux

A shell script is a text file that contains shell commands, and can be executed on a Linux system. Here are the steps to run a shell script in Linux: Make the script executable: chmod +x script.sh Replace “script.sh” with the actual name of your shell script file. This step sets the execute permission on … Read more