威妥玛拼音及其与汉语拼音的对照表

一、威妥玛拼音方案和汉语拼音方案对比

剑桥大学汉语教授威妥玛(T. F. Wade,1818—1895)在华任职期间,为方便外国人(主要是使用英语的人)学习和掌握汉语,由他根据北京读书音制订的拉丁字母拼音方案给汉字注音。这个方案以后被普遍 用来拼写中国的人名、地名等,一般称为威妥玛拼音。1958年2月11日,全国人大批准颁布《中文拼音方案》后,威妥玛拼音停止使用。《中文拼音方案》1958年2月11日,全国人大批准颁布《中文拼音方案》,这是中国人自己按照科学的语音学原理制定的专门拼写标准普通话的方案;1979年起,联合国决定采用《中文拼音方案》作为在各种拉丁字母文字中中国人名、地名的标准;1981年8月,国际标准化组织通过决议,规定把《中文拼音方案》作为文献工作中拼写有关中国的名称、词语的国际标准。1997年美国国会图书馆采用汉语拼音方案。

二、中文姓名音译说明

外文资料中文姓名音译通常采用的是威妥玛拼音,但是有些音译并不规范,已形成了一些习惯用法。如:孔子 konfucius,孙中山 sun yat-sen,毛泽东 MaoZedong,蔣介石Chiang Kai-shek。

三、威妥玛拼音和汉语拼音对照表

Wade-Giles / 韦氏拼音 Pinyin / 汉语拼音 Wade-Giles / 韦氏拼音 Pinyin / 汉语拼音
a   a   mi   mi  
ai   ai   miao   miao  
an   an   mieh   mie  
ang   ang   mien   mian  
ao   ao   min   min  
cha   zha   ming   ming  
ch’a   cha   miu   miu  
chai   zhai   mo   mo  
ch’ai chai   mou   mou  
chan   zhan   mu   mu  
ch’an chan   na   na  
chang zhang nai   nai  
ch’ang chang nan   nan  
chao   zhao   nang   nang  
ch’ao chao   nao   nao  
che   zhe   nei   nei  
ch’e   che   nen   nen  
chen   zhen   neng   neng  
ch’en zhen   ni   ni  
cheng zheng niang niang
ch’eng cheng niao   niao  
chi   ji   nieh   nie  
ch’i   qi   nien   nian  
chia   jia   nin   nin  
ch’ia qia   ning   ning  
chiang jiang niu   niu  
ch’iang qiang no   nuo  
chiao jiao   nu   nu  
ch’iao qiao   nuan   nuan  
chieh jie   nung   nong  
ch’ieh qie   nü   nü  
chien jian   nüeh nüe  
ch’ien qian   o   e  
chih   zhi   ou   ou  
ch’ih chi   pa   ba  
chin   jin   p’a   pa  
ch’in qin   pai   bai  
ching jing   p’ai   pai  
ch’ing qing   pan   ban  
chiu   jiu   p’an   pan  
ch’iu qiu   pang   bang  
chiung jiong p’ang pang  
ch’iung qiong pao   bao  
cho   zhuo   p’ao   pao  
ch’o   chuo   pei   bei  
chou   zhou   p’ei   pei  
ch’ou chou   pen   ben  
chu   zhu   p’en   pen  
ch’u   chu   peng   beng  
chua   zhua   p’eng peng  
chuai zhuai pi   bi  
ch’uai chuai p’i   pi  
chuan zhuan piao   biao  
ch’uan chuan p’iao piao  
chuang zhuang pieh   bie  
ch’uang chuang p’ieh pie  
chui   zhui   pien   bian  
ch’ui chui   p’ien pian  
chun   zhun   pin   bin  
ch’un chun   p’in   pin  
chung zhong ping   bing  
ch’ung chong p’ing ping  
chü   ju   po   bo  
ch’ü qu   p’o   po  
chüan juan   pou   ou  
ch’üan quan   pu   bu  
chüeh jue   p’u   pu  
ch’üeh que   sa   sa  
chün jun   sai   sai  
ch’ün qun   san   san  
en   en   sang   sang  
erh   er   sao   sao  
fa   fa   se   se  
fan   fan   sen   sen  
fang   fang   seng   seng  
fei   fei   sha   sha  
fen   fen   shai   shai  
feng   feng   shan   shan  
fo   fo   shang shang
fou   fou   shao   shao  
fu   fu   she   she  
ha   ha   shen   shen  
hai   hai   sheng sheng
han   han   shih   shi  
hang   hang   shou   shou  
hao   hao   shu   shu  
hei   hei   shua   shua  
hen   hen   shuai shuai
heng   heng   shuan shuan
ho   he   shuang shuang
hou   hou   shui   shui  
hsi   xi   shun   shun  
hsia   xia   shuo   shuo  
hsiang xiang so   suo  
hsiao xiao   sou   sou  
hsieh xie   ssu   si  
hsien xian   su   su  
hsin   xin   suan   suan  
hsing xing   sui   sui  
hsiu   xiu   sun   sun  
hsiung xiong sung   song  
hsü   xu   szu   si  
hsüan xuan   ta   da  
hsüeh xue   t’a   ta  
hsün xun   tai   dai  
hu   hu   t’ai   tai  
hua   hua   tan   dan  
huai   huai   t’an   tan  
huan   huan   tang   dang  
huang huang t’ang tang  
hui   hui   tao   dao  
hun   hun   t’ao   tao  
hung   hong   te   de  
huo   huo   t’e   te  
i   yi   teng   deng  
jan   ran   t’eng teng  
jang   rang   ti   di  
jao   rao   t’i   ti  
je   re   tiao   diao  
jen   ren   t’iao tiao  
jeng   reng   tieh   die  
jih   ri   t’ieh tie  
jo   ruo   tien   dian  
jou   rou   t’ien tian  
ju   ru   ting   ding  
juan   ruan   t’ing ting  
jui   rui   tiu   diu  
jun   run   to   duo  
jung   rong   t’o   tuo  
ka   ga   tou   dou  
k’a   ka   t’ou   tou  
kai   gai   tu   du  
k’ai   kai   t’u   tu  
kan   gan   tuan   duan  
k’an   kan   t’uan tuan  
kang   gang   tui   dui  
k’ang kang   t’ui   tui  
kao   gao   tun   dun  
k’ao   kao   t’un   tun  
kei   gei   tung   dong  
ken   gen   t’ung tong  
k’en   ken   tzu   zi  
keng   geng   tz’u   ci  
k’eng keng   tsa   za  
ko   ge   ts’a   ca  
k’o   ke   tsai   zai  
kou   gou   ts’ai cai  
k’ou   kou   tsan   zan  
ku   gu   ts’an can  
k’u   ku   tsang zang  
kua   gua   ts’ang cang  
k’ua   kua   tsao   zao  
kuai   guai   ts’ao cao  
k’uai kuai   tse   ze  
kuan   guan   ts’e   ce  
k’uan kuan   tsei   zei  
kuang guang tsen   zen  
k’uang kuang ts’en cen  
kuei   gui   tseng zeng  
k’uei kui   ts’eng ceng  
kun   gun   tso   zuo  
k’un   kun   ts’o   cuo  
kung   gong   tsou   zou  
k’ung kong   ts’ou cou  
kuo   guo   tsu   zu  
k’uo   kuo   ts’u   cu  
la   la   tsuan zuan  
lai   lai   ts’uan cuan  
lan   lan   tsui   zui  
lang   lang   ts’ui cui  
lao   lao   tsun   zun  
le   le   ts’un cun  
lei   lei   tsung zong  
leng   leng   ts’ung cong  
li   li   wa   wa  
liang liang wai   wai  
liao   liao   wan   wan  
lieh   lie   wang   wang  
lien   lian   wei   wei  
lin   lin   wen   wen  
ling   ling   weng   weng  
liu   liu   wo   wo  
lo   luo   wu   wu  
lou   lou   ya   ya  
lu   lu   yai   yai  
luan   luan   yang   yang  
lun   lun   yao   yao  
lung   long   yeh   ye  
lü   lü   yen   yan  
lüan luan   yin   yin  
lüeh lüe   ying   ying  
ma   ma   yo   yo  
mai   mai   yu   you  
man   man   yung   yong  
mang   mang   yü   yu  
mao   mao   yan   yuan  
mei   mei   yüeh yue  
men   men   yün   yun  
meng   meng      
威妥玛拼音及其与汉语拼音的对照表

来源: https://wjk.usst.edu.cn/2020/0429/c10157a219117/page.htm

Linux文件和文件夹的查找、替换、删除

持续更新Linux常用查找替换命令使用实例,包括各种find, sed, grep等

#搜索.log文件
find / -name ‘*.log’ 

#在log文件中查找关键词Abc
grep Abc /log 

#查找替换log文件的Abc为123
sed ‘s/Abc/123/g’ log 

#递归查找和替换
find . -type f -print0 | xargs -0 sed -i ‘s/原字符串/新字符串/g’ 
find . -name ‘*.html’ | xargs perl -pi -e ‘s/原字符串/新字符串/g’ #目录权限 chattr -i . / chattr -a .
sed -i ‘s/原字符串/新字符串/g’ `grep ‘原字符串’ -rl /查找目录/ –include “*.文件类型”`

#批量复制文件到所有子目录
find ./ -maxdepth 1 -type d -exec cp -r path/file {} \; 

#批量删除A111文件夹
find . -type d -name A111 -exec rm -rf {} \;
find . -type d | grep A111$ | xargs rm -rf

#批量删除d111和d222文件夹
find . \( -name d111 -o -name d222 \) -type d -exec rm -fr "{}" \;

#find并统计数量
find . -type f -print | wc -l 

#查找并批量删除空文件夹
find . -type d -empty -delete

#查找并批量删除所有.log文件
find . -name ‘*.log’ -type f -delete

#过滤111开头的结果
grep -v 111

#查找当前文件夹夹下的一级子目录中修改时间为 2022/2/22的abc.txt文件并删除
find . -maxdepth 2 -type f -name "abc.txt" -newermt '2022-02-22' | xagrs rm -rf

Alpine Linux 常用命令

Alpine Linux源管理

Alpine Linux国内源:

  • 清华大学:https://mirror.tuna.tsinghua.edu.cn/alpine/
  • 阿里云:https://mirrors.aliyun.com/alpine/
  • 中科大:https://mirrors.ustc.edu.cn/alpine/
  • 网易:http://mirrors.163.com/

配置:
直接抄中科大的帮助https://mirrors.ustc.edu.cn/help/alpine.html
一般情况下,将 /etc/apk/repositories 文件中 Alpine 默认的源地址 http://dl-cdn.alpinelinux.org/ 替换为 https://mirrors.ustc.edu.cn/ 即可。

sudo vi /etc/apk/repositories

Alpine Linux 包管理

简介
Alpine使用apk进行包管理,下面介绍常用命令

apk update #更新最新镜像源列表

apk search #查找所以可用软件包
apk search -v #查找所以可用软件包及其描述内容
apk search -v 'acf*' #通过软件包名称查找软件包apk search -v -d ‘docker’ #通过描述文件查找特定的软件包

apk add openssh #安装一个软件
apk add openssh openntp vim #安装多个软件
apk add --no-cache mysql-client #不使用本地镜像源缓存,相当于先执行update,再执行add

apk info #列出所有已安装的软件包
apk info -a zlib #显示完整的软件包信息
apk info --who-owns /sbin/lbu #显示指定文件属于的包

apk upgrade #升级所有软件
apk upgrade openssh #升级指定软件
apk upgrade openssh openntp vim #升级多个软件
apk add --upgrade busybox #指定升级部分软件包

apk del openssh #删除一个软件

安装python

sudo apk add --no-cache python3 python3-dev
#其中已自带pip

python其他依赖

sudo pip3 install Flask -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
sudo pip install paho-mqtt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
sudo pip install redis -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
sudo pip install requests -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

Alpine Linux服务管理

1.简介
alpine没有使用fedora的systemctl来进行服务管理,使用的是RC系列命令
未安装openrc时需执行以下命令

sudo apk add --no-cache openrc

rc-update
rc-update主要用于不同运行级增加或者删除服务。

alpine:~# rc-update --help
Usage: rc-update [options] add <service> [<runlevel>...]
   or: rc-update [options] del <service> [<runlevel>...]
   or: rc-update [options] [show [<runlevel>...]]
 
Options: [ asuChqVv ]
  -a, --all                         Process all runlevels
  -s, --stack                       Stack a runlevel instead of a service
  -u, --update                      Force an update of the dependency tree
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -V, --version                     Display software version
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly (repeat to suppress errors)

rc-status
rc-status 主要用于运行级的状态管理。

alpine:~# rc-status --help
Usage: rc-status [options] <runlevel>...
   or: rc-status [options] [-a | -c | -l | -m | -r | -s | -u]
 
Options: [ aclmrsuChqVv ]
  -a, --all                         Show services from all run levels
  -c, --crashed                     Show crashed services
  -l, --list                        Show list of run levels
  -m, --manual                      Show manually started services
  -r, --runlevel                    Show the name of the current runlevel
  -s, --servicelist                 Show service list
  -u, --unused                      Show services not assigned to any runlevel
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -V, --version                     Display software version
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly (repeat to suppress errors)

rc-service
rc-service主用于管理服务的状态

alpine:~# rc-service --help
Usage: rc-service [options] [-i] <service> <cmd>...
   or: rc-service [options] -e <service>
   or: rc-service [options] -l
   or: rc-service [options] -r <service>
 
Options: [ ce:ilr:INChqVv ]
  -e, --exists <arg>                tests if the service exists or not
  -c, --ifcrashed                   if the service is crashed then run the command
  -i, --ifexists                    if the service exists then run the command
  -I, --ifinactive                  if the service is inactive then run the command
  -N, --ifnotstarted                if the service is not started then run the command
  -l, --list                        list all available services
  -r, --resolve <arg>               resolve the service name to an init script
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -V, --version                     Display software version
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly (repeat to suppress errors)

openrc
openrc主要用于管理不同的运行级。

alpine:~# openrc --help
Usage: openrc [options] [<runlevel>]
 
Options: [ a:no:s:SChqVv ]
  -n, --no-stop                     do not stop any services
  -o, --override <arg>              override the next runlevel to change into
                                    when leaving single user or boot runlevels
  -s, --service <arg>               runs the service specified with the rest
                                    of the arguments
  -S, --sys                         output the RC system type, if any
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -V, --version                     Display software version
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly (repeat to suppress errors)

我常用的RC系列命令
增加服务到系统启动时运行,下例为docker

rc-update add docker boot

重启网络服务

rc-service networking restart

列出所有服务

rc-status -a

服务开机自启

Alpine Linux 的 开机自启目录在/etc/local.d下,这个目录用于放置我们需要在本地服务启动或停止后执行的脚本

先上目录下的说明文档:

This directory should contain programs or scripts which are to be run
when the local service is started or stopped.

If a file in this directory is executable and it has a .start extension,
it will be run when the local service is started. If a file is
executable and it has a .stop extension, it will be run when the local
service is stopped.

All files are processed in lexical order.

Keep in mind that files in this directory are processed sequentially,
and the local service is not considered started or stopped until
everything is processed, so if you have a process which takes a long
time to run, it can delay your boot or shutdown processing.

简单翻译了下:

此目录应包含在启动或停止本地服务时要运行的程序或脚本。
如果此目录中的文件是可执行文件且扩展名为.start,
则在启动本地服务时将运行该文件。
如果文件是可执行的并且具有.stop扩展名,
则在本地服务停止时将运行该文件。所有文件都按词汇顺序处理。
请记住,此目录中的文件是按顺序处理的,并且在处理完所有内容之前不会将本地服务视为已启动或停止,
因此如果您的进程需要很长时间才能运行,则可能会延迟启动或关闭处理。

自定义开机自启服务,由于Alpine Linux自带了nohup后台守护,我们就直接使用nohup设置开机自启。

先编辑下startup.start文件,注意,.start后缀需要固定,前面名称随意:
vi startup.start
我的内容如下

#!/bin/bash
sudo nohup python3 /home/plugin/main.py & >> /home/plugin/plugin.log

然后保存退出。

赋予脚本可执行权限:

chmod +x startup.start

设置 local 服务开机启动:

rc-update add local
sudo service local start

如执行rc-update add local失败,可能需执行sudo touch /run/openrc/softlevel之后在执行rc-update add local
这样当系统开机时就能执行startup.start开达到开机自动的目的。

bashps -a 查看启动的进程

总结:以上内容也适用于在docker 中基于Alpine 镜像的业务扩展。

转自: https://blog.csdn.net/ctwy291314/article/details/104634667