Unix
July 23, 2020, admin, 0
How to rename pdf file extensions? I had pdf files on my server with extension .pdf and I wanted to rename the extension to PDF. Use the following one-liner to do this. for f in *.pdf; do mv $f `basename $f .pdf`.PDF; done; You are done.
Like this:
Like Loading...
July 2, 2019, admin, 0
If you want to add subject in the postfix log files, add the following in main.cf file at the bottom. vi /etc/postfix/main.cf header_checks = regexp:/etc/postfix/header_checkssmtp_header_checks = regexp:/etc/postfix/header_checks And add the lines below in /etc/postfix/header_checks files, create the file if it’s not already there. /^subject:/ WARN/^X-PHP-Originating-Script:/ WARN Now restart postfix More
Like this:
Like Loading...
June 21, 2019, admin, 0
Enter the following command in terminal. HISTTIMEFORMAT=”%d/%m/%y %T ” Or, to make the change permanent for the current user: echo ‘export HISTTIMEFORMAT=”%d/%m/%y %T “‘ >> ~/.bashrcsource ~/.bashrc Now try the history command, you will see the timestamp along with the command history.
Like this:
Like Loading...
July 26, 2017, admin, 0
To force your website with SSL using htaccess and mod_rewrite, use the following rule in the website’s .htaccess. RewriteEngine On RewriteCond %{HTTP_HOST} ^yourwebsite\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourwebsite.com/$1 [R=301,L] If it’s a subdomain, use this. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} sub RewriteRule ^(.*)$ https://yourwebsite.com/sub/$1 [R=301,L] Note: Replace yourwebsite.com with the More
Like this:
Like Loading...
September 28, 2016, admin, 0
In Postfix, enter the following command to flush the email queue: $ postfix flush Or you can use: $ postfix -f To see the mail queue, enter: $ mailq Or $ postqueue -p To remove all mail from the queue: $ postsuper -d ALL To remove all deferred emails in queue: $ postsuper -d ALL More
Like this:
Like Loading...