This is great! Finally a key combination to lock screen of Mac OS X - Sierra:
Command + Control + Q
Saturday, September 8, 2018
Wednesday, July 4, 2018
Apache HTTPD Log Time to serve request in seconds
You just need to add %T
An example of Log Format below:
LogFormat "%h %l %u %t \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\" \"%{X-Forwarded-For}i\" \"%{SN-Akamai-IP}i\" %{Host}i \"%{JSESSIONID}C\" \"%{AWSELB}C\"" combined
An example of Log Format below:
LogFormat "%h %l %u %t \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\" \"%{X-Forwarded-For}i\" \"%{SN-Akamai-IP}i\" %{Host}i \"%{JSESSIONID}C\" \"%{AWSELB}C\"" combined
Monday, April 2, 2018
Apache HTTPD: logging response header
You just need to add following string to the LogFormat directive from inder httpd.conf:
\"%{HEADER_NAME}o\"
Friday, March 2, 2018
Monday, February 12, 2018
Monitor outgoing port traffic on Linux
Following command can be used:
netstat -nputw | grep -v "127.0.0.1"
netstat -nputw | grep -v "127.0.0.1"
Monday, February 5, 2018
Get Linux and kernel versions
1. Get Linux version:
cat /etc/*release
2. Get kernel version:
uname -r
cat /etc/*release
2. Get kernel version:
uname -r
Saturday, January 20, 2018
Fix "Found a swap file by the name"
1. If you get the following:
E325: ATTENTION
Found a swap file by the name ".file.conf.swp"
owned by: root dated: Wed Jan 3 11:43:03 2018
file name: /etc/httpd/conf.d/file.conf
modified: YES
user name: root host name: system-rh
process ID: 19891
While opening file "file.conf"
dated: Tue Jan 16 15:51:50 2018
NEWER than swap file!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r file.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".file.conf.swp"
to avoid this message.
2. List all hidden files
ls -al
3. Remove troubled swap file:
rm -rf .file.conf.swp
E325: ATTENTION
Found a swap file by the name ".file.conf.swp"
owned by: root dated: Wed Jan 3 11:43:03 2018
file name: /etc/httpd/conf.d/file.conf
modified: YES
user name: root host name: system-rh
process ID: 19891
While opening file "file.conf"
dated: Tue Jan 16 15:51:50 2018
NEWER than swap file!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r file.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".file.conf.swp"
to avoid this message.
2. List all hidden files
ls -al
3. Remove troubled swap file:
rm -rf .file.conf.swp
Subscribe to:
Posts (Atom)