copy with magic

เรามี subdomain แบบนี้

/home/nginx/files.sourcode.com/htdocs/
/home/nginx/project.sourcode.com/htdocs/
/home/nginx/threee.sourcode.com/htdocs/
/home/nginx/xxx.sourcode.com/htdocs/
/home/nginx/yes.sourcode.com/htdocs/
/home/nginx/intel.sourcode.com/htdocs/
/home/nginx/th.sourcode.com/htdocs/

เราจะโยน robots.txt เข้าไปใน htdocs ของแต่ละ subdomain

เราทำแบบนี้

$ echo /home/nginx/*sourcode.com/htdocs/ | xargs -n 1 cp robots.txt

Like a magic !

Austin, texas

พยายามหาตั้งนานว่า Austin มันใช้ timezone อะไร ….

จนพบว่า

# ln -s /usr/share/zoneinfo/US/Central /etc/localtime

perl: warning: Setting locale failed.

เมื่อท่านพบกับข้อความเหล่านี้!

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

ก็ขอให้แก้ตามนี้

# locale-gen en_US en_US.UTF-8 en_US.UTF-8
# dpkg-reconfigure locales

en_US en_US.UTF-8 en_US.UTF-8 เทียบได้กับ LANGUAGE = “en_US”, LC_ALL = “en_US.UTF-8”, LANG = “en_US.UTF-8”
ถ้าอยากแก้เป็นอย่างอื่นก็สามารถแก้ได้ตามสะดวก