Linux / Unix: Shell Remove Empty Lines

To remove empty lines from a text file in Linux or Unix, you can use the following command: grep . file.txt > output.txt This command uses grep to search for lines that contain a period . and writes the matching lines to a new file called output.txt. This effectively removes all empty lines from the … Read more

Apache 2 Reload HTTPD Configuration File Without Restarting Apache Config Changes

To reload the Apache 2 HTTPD configuration file without restarting the Apache service, you can use the following command: sudo apache2ctl graceful The graceful option signals the Apache process to reload the configuration file and apply the changes without interrupting ongoing requests. This allows you to make changes to the Apache configuration file and have … Read more