Posts

from Advanced Bash-Scripting Guide: http://tldp.org/LDP/abs/html/x23170.html Sed Sed is a non-interactive [1] stream editor. It receives text input, whether from stdin or from …

lufy Dec 07, 2019 Read More

How to configure rsyslog Some records of resent works. The point is to test rsyslog's file size limit and log format. 1. Create log format: Next is to add a new template about …

lufy Jun 02, 2018 Read More

In shell scripts, symbols are very usefull to handle strings in variables. Next list some frequently used methods of getting specified strings from variables. ${var##*str}  …

lufy May 02, 2018 Read More

Records of commanly used svn commands. 1. Create SVN server: a. Install package. yum install subversion b. Create directory: mkdir /var/svn c. Create repository: svnadmin c…

lufy Apr 22, 2018 Read More

Original site: http://blog.redbranch.net/2015/07/30/centos-7-as-nat-gateway-for-private-network/ The scenario is a small private network connected via a switch and using 192…

lufy Dec 25, 2017 Read More

When we are doing some tests on linux that take very long time, and we have to monitor its status at every moment, in this case, we can set the mail client on linux, to inform tes…

lufy Dec 09, 2017 Read More

Mark my first little spider about scrapy. Motivation: Recent days, I was busy with  testing the VMServer 4.3 (a virtualization software of PUHUA). The beta2 version is just…

lufy Dec 06, 2017 Read More

Original link: https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do   To understand what yield does, you must understand what gener…

lufy Nov 14, 2017 Read More

In linux bash, and django ./manage.py shell, double click TAB key would get auto completion. However, the default python interpreter has no such function, but fortunately, this co…

lufy Oct 31, 2017 Read More

A logic volum snapshot could restore the filesystem on ur logical volum. Here's how to do: lvcreate --size 100M --snapshot --name snaptest /dev/test-vg/lvol0 This would create a…

lufy Sep 28, 2017 Read More