find *.txt -type f -print0 | xargs -0 sed -i '' 's/search_keyword/replace_word/g'
mariadb : query monitoring Hint
Logging : Turn On SQL > SET global general_log = 1; Logging : Turn Off SQL > SET global general_log = 0; # tail -f /var/log/mariadb/queries.log
oracle xe : FUNCTION wm_concat
CREATE OR REPLACE TYPE wm_concat_impl AUTHID CURRENT_USER AS OBJECT ( curr_str VARCHAR2 (32767), STATIC FUNCTION odciaggregateinitialize (sctx IN OUT wm_concat_impl) RETURN NUMBER, MEMBER FUNCTION odciaggregateiterate ( SELF IN OUT wm_concat_impl, p1 IN VARCHAR2 ) RETURN NUMBER, MEMBER FUNCTION odciaggregateterminate ( SELF IN wm_concat_impl, returnvalue OUT VARCHAR2, flags IN NUMBER ) RETURN NUMBER, MEMBER FUNCTION odciaggregatemerge […]
centos7 : change user home directory Hint!
# usermod -d /home/user1 -muser1
centos7 : oracle 11g XE install Hnit
# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm # /etc/init.d/oracle-xe configure # systemctl start oracle-xe.service # systemctl enable oracle-xe.service # systemctl status oracle-xe.service # su -l oracle $ cd /u01/app/oracle/product/11.2.0/xe/bin/ $ . ./oracle_env.sh $./sqlplus system SQL*Plus: Release 11.2.0.2.0 Production on 금 3월 25 03:48:39 2016 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter password: SQL> check users SQL> SELECT * […]
apache 2.x : increase concurrent connections, by prefork, Hint!
try!....... vi /etc/httpd/conf.modules.d/00-mpm.conf LoadModule mpm_prefork_module modules/mod_mpm_prefork.so vi /etc/httpd/conf/httpd.conf <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 2000 MaxClients […]
Mac OS X : brew install imagemagick libwmf wmf2eps Hint
$ brew install imagemagick $ brew install libwmf $ wmf2eps --auto *.wmf $ find . -type f -name "*.wmf" -exec wmf2eps --auto {} \; $ brew install ghostscript $ convert aaa.eps aaa.png $ find . -type f -name "*.eps" -exec convert {} {}.png \;
centos7 : named bind chroot Hint
# yum -y install bind bind-utils # yum -y install bind-chroot # /usr/libexec/setup-named-chroot.sh /var/named/chroot on # systemctl start named-chroot # systemctl enable named-chroot # vi /etc/named.conf ----------------------------- options { #listen-on port 53 { 127.0.0.1; }; #listen-on-v6 port 53 { ::1; }; directory […]
Linux : network monitoring Hint
netstat -a | more tcpdump -i eth0 lsof vmstat htop
centos7 : inotify inotifywait convmv Hint
# yum install inotify # yum install convmv test.sh --------------------------- #!/bin/sh # /root/bin/inotifywaitWP.sh /home/*/*/wordpress/wp-content/uploads EVENTS="CREATE,MOVED_TO" if [ -z "$1" ]; then echo "Usage: $0 cmd ..." exit -1; fi inotifywait -e "$EVENTS" -mrq --format '%w%f' $1 | ( while read FILE; do […]