Set default charset in Apache
Answer:
E.g. set the default charset to UTF-8
Add the following lines to the Apache configuration (httpd.conf)
AddDefaultCharset utf-8
Restart Apache to take effect
apachectl -k graceful
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Set default charset in Apache
Answer:
E.g. set the default charset to UTF-8
Add the following lines to the Apache configuration (httpd.conf)
AddDefaultCharset utf-8
Restart Apache to take effect
apachectl -k graceful
How do I find out zombie process?
Answer
Use this command
# ps aux | awk '{ print $8 " " $2 }' | grep -w Z
It will give something like the following (The number is the zombie's pid)
Z 5938
Z 5485
...
Then we can kill it by using the pid
# kill -9 5938
A better alternative to top
Answer:
It is the htop : http://htop.sourceforge.net
To install under Ubuntu
# sudo apt-get install htop
Convert spaces into new lines using sed
Answer:
If you have a text file like:
1 2 3 4 5
How to convert the spaces into new lines?
Use sed!
# sed 's/ /\n/g' text.txt
Split a string into array in Perl
Answer:
To split a string into an array in Perl, follow the codes below
my $data = 'peter,mary,john';
my @values = split(',', $data);