Plongez dans l’univers exaltant des bonus Betclic Casino

Apr 17th,2026 No Comments

Plongez dans l’univers captivant des offres Betclic Casino

Introduction

Dans le monde du jeu en ligne, Betclic Casino brille par son offre variée et ses promotions alléchantes. Que vous soyez un joueur occasionnel ou un passionné de jeux de casino, Betclic propose une expérience immersive. Cet article examine en détail les avantages de Betclic, en mettant l’accent sur le codigo promocional Betclic Casino qui peut transformer vos sessions de jeu.

Ce que propose Betclic

Betclic est bien plus qu’un simple casino en ligne. Voici quelques-unes de ses principales caractéristiques :

  • Une large gamme de jeux : machines à sous, jeux de table, live casino, etc.
  • Des promotions régulières et des bonus attractifs.
  • Une interface utilisateur intuitive et accessible via mobile.
  • Un service client réactif et professionnel.

Bonus et codes promotionnels

Les bonus sont l’un des principaux attraits des casinos en ligne. Betclic ne déçoit pas avec ses offres attractives. Voici un aperçu des différents types de bonus disponibles :

Type de Bonus Description
Bonus de Bienvenue Un bonus de 100% jusqu’à 200€ sur votre premier dépôt.
Free Spins Des tours gratuits sur des machines à sous sélectionnées lors de votre inscription.
Promotions Hebdomadaires Offres spéciales chaque semaine pour les joueurs réguliers.
Programme de Fidélité Accumulatez des points pour débloquer des récompenses exclusives.

Pour bénéficier de ces promotions, il est souvent nécessaire d’utiliser un codigo promocional Betclic Casino. Ce code est généralement fourni lors des campagnes marketing et peut être utilisé lors de la création de votre compte ou de votre dépôt.

Jeux populaires sur Betclic

Betclic Casino propose une vaste sélection de jeux. Voici quelques-uns des plus joués :

  • Machines à sous: Les incontournables, avec des thèmes variés et des jackpots impressionnants.
  • Roulette: Un classique qui attire de nombreux fans grâce à son ambiance réelle.
  • Blackjack: Un jeu de stratégie apprécié pour sa simplicité et ses possibilités de gains.
  • betclic casino fr

  • Croupiers en direct: Vivez l’expérience du casino en temps réel depuis chez vous.

Focus sur les machines à sous

Les machines à sous représentent une grande partie de l’attrait de Betclic. Avec des titres célèbres tels que :

  • Starburst
  • Book of Dead
  • Gonzo’s Quest

Chaque machine à sous a ses propres caractéristiques, ce qui rend chaque partie unique et excitante.

Pourquoi choisir Betclic Casino ?

Il existe plusieurs raisons pour lesquelles Betclic se distingue des autres casinos en ligne :

  • Fiabilité: Betclic est licencié et régulé, offrant une sécurité maximale aux joueurs.
  • Variété: Une gamme étendue de jeux qui s’adresse à tous les goûts.
  • Service client: Disponible 24/7 pour répondre à toutes vos questions.
  • Utilisation facile: Une interface intuitive qui facilite la navigation.

Conclusion

Betclic Casino représente une excellente option pour ceux qui recherchent une expérience de jeu enrichissante et sécurisée. Grâce à ses offres de bienvenue, ses promotions régulières, et son large éventail de jeux, il est facile de comprendre pourquoi tant de joueurs choisissent Betclic. N’oubliez pas d’utiliser votre codigo promocional Betclic Casino pour maximiser votre expérience de jeu et profiter pleinement de toutes les possibilités offertes par cette plateforme passionnante.

Unleashing the Power of Monsterwin for Unmatched Gaming Triumph

Apr 16th,2026 No Comments

Unleashing the Power of Monsterwin for Unmatched Gaming Triumph

Welcome to the exciting world of MonsterWin Canada Casino, where thrilling gameplay meets unbeatable rewards! This article will take you on a journey through the unique offerings, promotions, and experiences that set MonsterWin apart in the vibrant Canadian online casino landscape. Buckle up as we dive deep into the monster-sized fun that awaits!

Table of Contents

1. Introduction to MonsterWin

MonsterWin Casino has quickly emerged as a leader in the online gaming scene in Canada. With its vast array of games, generous bonuses, and a user-friendly interface, it captures the hearts of both novice and seasoned players alike. MonsterWin is committed to providing an entertaining and secure environment, ensuring that every gaming experience is as exhilarating as possible.

2. A Diverse Game Selection

One of the standout features of MonsterWin is its extensive selection of games. Players can explore a variety of genres, ranging from classic table games to state-of-the-art slot machines.

Popular Game Categories

  • Slots: Featuring themes from ancient civilizations to futuristic https://monsterwincanada.net/ adventures, these slots offer captivating graphics and immersive gameplay.
  • Table Games: Classic games like blackjack, roulette, and baccarat are available, providing timeless entertainment.
  • Live Dealer Games: For those seeking a more authentic experience, live dealer options allow players to interact with real dealers in real-time.

Highlighted Games

Game Type RTP
Monster Jackpot Slot 96.5%
Blackjack Classic Table Game 99.5%
Live Roulette Live Dealer 97.3%

3. Bonuses and Promotions

At MonsterWin, the excitement doesn’t stop at the games. The casino offers a wealth of promotions designed to maximize your deposits and enhance your gaming experience.

Types of Bonuses

  • Welcome Bonus: New players can kickstart their adventure with a substantial welcome package that includes free spins and matching deposits.
  • Reload Bonuses: Regular players can benefit from reload bonuses, giving them extra funds on subsequent deposits.
  • Loyalty Program: Consistent players are rewarded through a loyalty program that offers exclusive bonuses and perks.

Promotional Events

Throughout the year, MonsterWin hosts special events and tournaments, allowing players to compete for additional prizes and bragging rights. Keep an eye out for seasonal promotions that bring even more excitement to the gaming experience!

4. User Experience and Interface

The user interface of MonsterWin Canada Casino is designed with players in mind. The site is visually appealing and easy to navigate, providing a seamless gaming experience across different devices.

Mobile Compatibility

In today’s fast-paced world, gaming on-the-go is essential. MonsterWin offers a mobile-friendly platform that ensures players can enjoy their favorite games anytime, anywhere.

Accessibility Features

  • Search Functionality: Quickly find your favorite games with the search bar feature.
  • Filter Options: Sort games by category, popularity, or newest additions, making it easier to discover fresh content.

5. Payment Methods and Security

Safety and convenience are paramount when it comes to online casinos. MonsterWin provides a variety of safe payment methods for deposits and withdrawals, ensuring a smooth financial transaction process.

Supported Payment Methods

  • Credit and Debit Cards (Visa, MasterCard)
  • E-Wallets (PayPal, Skrill, Neteller)
  • Bank Transfers
  • Cryptocurrency Options

Security Measures

MonsterWin employs the latest security technologies to protect player data and transactions. The use of SSL encryption technology ensures that all personal and financial information remains confidential and secure.

6. Customer Support Services

Should you encounter any issues or have questions about your gaming experience, MonsterWin boasts a dedicated customer support team ready to assist you.

Support Channels

  • Live Chat: Available 24/7, this feature allows for real-time assistance for urgent matters.
  • Email Support: For less urgent inquiries, players can reach out via email and expect timely responses.
  • FAQ Section: The comprehensive FAQ section covers common questions and helps players find solutions independently.

7. Conclusion

In conclusion, MonsterWin Canada Casino is a premier destination for online gaming enthusiasts. With its diverse game selection, generous bonuses, user-friendly interface, secure payment options, and excellent customer support, it truly stands out in the crowded online casino market.

Whether you’re a new player looking to explore the world of online casinos or a seasoned veteran seeking the next big win, MonsterWin is your gateway to an unforgettable gaming experience. Join today and unleash the power of MonsterWin!

proxy p2p

Mar 19th,2020 No Comments
内网服务S -> 外网机器P -> 终端C

kcp协议: 求快不求量 https://github.com/skywind3000/kcp
kcptun: 基于 kcp-go做的高速远程端口转发(隧道),做的是P->C的事 https://github.com/xtaci/kcptun
frp: 高性能内网穿透的反向代理软件,可将将内网服务暴露映射到外网服务器,做的是S->P的事   https://github.com/fatedier/frp
udp2raw-tunnel:  udp被qos问题,这个把udp伪装tcp https://github.com/wangyu-/udp2raw-tunnel
zerotier: https://www.zerotier.com/  p2p平台
SAKURA FRP: https://www.natfrp.com/  基于frp 端口转发平台
测试nat类型
https://github.com/jtriley/pystun
yum -y install epel-release
yum -y install python-pip
pip install pystun
pystun

https://blog.csdn.net/hanghangaidoudou/article/details/60961728
以下两个环境不能打洞
Port Restricted Cone NAT 与 Symmetric NAT
Symmetric NAT 与 Symmetric NAT

https://apple.stackexchange.com/questions/98331/can-i-connect-to-a-local-smb-share
mac不能用127.0.0.1
sudo ifconfig lo0 127.0.0.2 alias up 

Centos 7 环境相关

Oct 15th,2015 No Comments
# init
yum -y install net-tools
yum -y install vim 
yum -y install wget 
yum -y install zip unzip 
yum -y install bzip2 
yum -y install autoconf
yum -y install screen
yum -y install fonts-tweak-tool
# c/c++
yum -y install gcc-c++ libstdc++-devel 
# java
yum -y install java-1.7.0-openjdk* -y 

# disable selinux
/etc/sysconfig/selinux

# 关闭防火墙&关闭开机启动
systemctl stop firewalld.service
systemctl disable firewalld.service

# develop tools
yum groupinstall "Development Tools"

# erlang wxWidgets 支持
# 是否安装:which wx-config && wx-config --version-full 
yum -y install mesa-libGL-devel 
yum -y install mesa-libGLU-devel
yum -y install gtk2-devel
wxWidgets-3.0.2/configure --with-opengl --enable-debug --enable-unicode

# erlang 
yum -y install openssl-devel
yum -y install ncurses-devel 

# perl Unix::Syslog
yum install cpan
perl -MCPAN -e shell
install Unix::Syslog

 

Ejabber 压力测试

Oct 6th,2015 No Comments

1.测试环境

– 服务端:普通机*(I3 2核心4线程)/mem:16GB

– 客户端:普通机*(I3 2核心4线程)/mem:48GB(4台)

– 系统:sys:Centos  6  Erlang:OTP 18   Ejabberd 15

– 网络:内网千兆互联

分布式测试

distributed-test

 

2.Ejabberd 性能调优

调整ulimit限制

编辑/etc/security/limits.conf,加上:

# 方便看core
root hard core unlimited
root soft core unlimited

root hard fsize unlimited
root soft fsize unlimited

# socket连接数限制
root hard nofile 655350
root soft nofile 655350

编译优化

官方不建议开启Hipe,速度提升的同时可能带来一些问题,如fprof不能正常使用,这里面选择部分hipe(xml),参考Speed Up Ejabberd

cd ejabberd/deps/p1_xml/src
erlc +native xml.erl
cp xml.beam ejabberd ebin

启动参数调整(安装路径默认)

编辑/etc/ejabberd/ejabberdctl.cfg

  • ERL_MAX_PORTS (默认最大32w在线)

每个到客户端(s2c)和服务器(s2s)的连接消耗一个port, ERL_MAX_PORTS定义了Ejabberd可以支持的并发连接数,默认值为32000,大并发连接场景下的应用需要增大该参数的值。这里改成3200000。

ERL_MAX_PORTS=3200000
  • ERL_PROCESSES (默认最大12w在线)

Erlang消耗很多轻量级进程, 如果Ejabberd比较繁忙, 可能会达到进程数上限, 这种情况会导致高。 当消息延迟过高时, 需要判断是否是由于该参数引起的。默认值为250000,这里改成25000000。

ERL_PROCESSES=25000000
  • Mnesia表过载

大并发时mnesia警告** WARNING ** Mnesia is overloaded: {dump_log, write_threshold},在disc_copy类型的表时,有两个参数影响出现Mnesia is overloaded: {dump_log, write_threshold}错误,默认参数是dump_log_write_threshold 50000 -mnesia dc_dump_limit 40。

dc_dump_limit:磁盘备份表从内存中被抛弃的时间间隔
dump_log_time_threshold:在新垃圾回收之前的最大的写入数

MNESIA_OPTIONS="-mnesia dump_log_write_threshold 50000 -mnesia dc_dump_limit 40"
  • ETS表个数限制问题

ets表使用的数目超过系统的限制提示:”Too many db tables”

ERL_MAX_ETS_TABLES=140000
  • 快速垃圾回收(影响不确定,不是很建议加)

按1k/sec 频率登录时,当在线到达10w时会触发gc(Major collection),在gc执行期间开销比较大(通过VTune),会引起中断,造成cpu跑满,系统响应下降。fullsweep_after控制深扫描的频率,这个参数确定多少次gc后执行一次深度gc,这里调成0,可以较快内存回收。

ERL_FULLSWEEP_AFTER=0
export ERL_FULLSWEEP_AFTER
  • Erlang 虚拟机参数(影响不确定,不是很建议加)

参考:http://www.cnblogs.com/lulu/p/4132278.html

修改/etc/ejabberd/ejabberdctl.cfg中的ERL_OPTIONS

ERL_OPTIONS="-sbt db -sbwt none -swt low"

+sbt db 绑定调度器与CPU的亲缘性
+sbwt none 关闭beam 调度器 spinlock,降低CPU
+swt low 提高调度器唤醒灵敏度,避免长时间运行睡死问题
+P 2000000 进程数限制(默认即可)
+K true 启用epoll (默认使用)
+smp auto 在多核上开启多个调度器 (默认使用)

 

ejabberd配制调整

  • 调整日志等级

修改/etc/ejabberd/ejabberd.yml

loglevel: 3
  • 堆大小监视调整

在线到达10w后cpu消耗大问题。

watchdog_large_heap: 10000000

 

内核参数调整

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_max_syn_backlog = 65535
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_rmem = 4096 4096 16777216
net.ipv4.tcp_wmem = 4096 4096 16777216
net.ipv4.ip_local_port_range = 1025 65000
fs.file-max = 65535000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 30000
net.ipv4.tcp_mtu_probing = 1

3.压测场景

  •  2k/s 登陆、认证、操作。
  • 运行2分钟后20w在线

4.结果

  • 4台tsung集群未跑满,瓶颈在服务器。
  • 服务器:未触发gc时CPU剩余30%左右。
  • 服务器:内存最高7g,登陆完后稳定3g。
  • 服务器:流量上平均收2.5m/sec,发3.5m/sec。
  • 在gc(Major collection)启动时会比较严重影响服务器响应速度,在不开启快速回收(fullsweep_after)在线达不到要求(20w),下图可以明显看到。

ejabberd_gc

 

参考资料

1.Erlang C1500K长连接推送服务-性能

http://www.cnblogs.com/lulu/p/4132278.html

2.Erlang进程堆垃圾回收机制

http://blog.csdn.net/mycwq/article/details/26613275

3.Erlang垃圾回收机制

http://www.cnblogs.com/me-sa/archive/2011/11/13/erlang0014.html

4.erlang 虚机CPU 占用高排查

http://www.cnblogs.com/lulu/p/3978378.html

MCRouter笔记(三) 路由句柄

Aug 12th,2015 No Comments

来自:https://github.com/facebook/mcrouter/wiki/List-of-Route-Handles

 

AllAsyncRoute

立即发送请求到所有子路由句柄,不等待子路由句柄返回,直接返回NullRoute给请求方。

属性:

  • children: 子路由句柄。

AllFastestRoute

立即发送请求到所有子路由句柄,把第一个无错误的响应返回给请求,其它的返回默认忽略。

属性:

  • children: 子路由句柄。

AllInitialRoute

立即发送请求到所有子路由句柄,等待子路由句柄列表中第一个句柄的返回,并把这个给请求方,其它的返回默认忽略。

属性:

  • children: 子路由句柄。

AllMajorityRoute

Immediately sends the same request to all child route handles. Waits for replies until a non-error result appears (half + 1) times (or all replies if that never happens), and then returns the latest reply that it sees (the effect is that typically the reply with the most common result is returned).

  • children: 子路由句柄。

AllSyncRoute

立即发送请求到所有子路由句柄,返回所有回复中最差的。

属性:

  • children: 子路由句柄。

DevNullRoute

Same as NullRoute, but with mcrouter stats reporting. See Stats list.

ErrorRoute

Immediately returns the error reply for each request. You can specify the error value to return: "ErrorRoute|MyErrorValueHere"

FailoverRoute

首先发送请求到子路由句柄列表中的第一个路由句柄,如果没有返回错误就立即返回请求,否则继续发到列表中的下一个路由句柄。如果所有都返回错误则返回最后一个错误的回复。注意:没命中不算错误。

  • children: 子路由句柄。
  • failover_errors:对象或数组,可选项,默认所有错误。

failover_errors可指定错误类型,如:

{
 "gets": [ "connect_timeout", "timeout", "connect_error", "tko" ],
 "updates": [], // empty array: will not failover.
 // "deletes" is missing, default behavior (all errors) will be assumed.
}
[ "connect_timeout", "timeout", "connect_error", "tko" ]

FailoverWithExptimeRoute

 

HashRoute

根据哈希路由。

  • children: 子路由句柄。
  • salt:key的前缀。
  • hash_func:哈希函数Ch3, Crc32 or WeightedCh3,默认为Ch3。
  • weights:hash_func为WeightedCh3时有效。

HostIdRoute

根据客户端ID路由。

  • children: 子路由句柄。

LatestRoute

随机连接,如果返回错误再次随机,最大随机次数为failover_count。

  • children: 子路由句柄。
  • failover_count:默认5次
  • failover_errors:错误类型。

MCRouter笔记(二) 常见应用

Aug 7th,2015 No Comments
  • 分片池

当数据量太大,单个memcached不够放时,通常会把数据拆分到多台机器上,这就是所谓的水平分割。mcrouter提供了一个行之有效的consistent hashing算法(furc_hash),算法允许给多个memcached实例分配哈希值。Hostname hashing再根据分配的哈希值为客户端选择一个独一无二的副本,在特定的应用中有很多其他的有用的散列方法。

分片池

分片池

 

配制说明:请求按hash key路由到池A中不同的memcached。

{
   "pools": {
     "A": {
       "servers": [
         // your destination memcached boxes here, e.g.:
         "127.0.0.1:12345",
         "[::1]:12346"
       ]
     }
   },
   "route": "PoolRoute|A"
 }

 

Read More…

MCRouter笔记(一) – 安装

Aug 6th,2015 2 Comments
#!/bin/bash

temp_path=$(dirname "$0")
cd $temp_path
real_path=$(pwd)
echo  "本脚本文件所在目录路径是: $real_path "
cd $real_path

yum -y install unzip bzip2-devel libtool libevent-devel libcap-devel openssl-devel
yum -y install bison flex snappy-devel numactl-devel cyrus-sasl-devel

mkdir -p /data/source/mcrouter/src

#GCC4.9 folly用到了诸如 chrono 之类的C++11库,必须使用GCC 4.8以上版本,才能够完整支持这些用到的C++11特性和标准库。
cd /data/source/mcrouter/src
wget https://gmplib.org/download/gmp/gmp-5.1.3.tar.bz2
tar jxf gmp-5.1.3.tar.bz2 && cd gmp-5.1.3/
./configure && make && make install

cd /data/source/mcrouter/src
wget http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2
tar jxf mpfr-3.1.2.tar.bz2 ;cd mpfr-3.1.2/
./configure && make && make install

cd /data/source/mcrouter/src
wget http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz
tar xzf mpc-1.0.1.tar.gz ;cd mpc-1.0.1
./configure && make && make install

cd /data/source/mcrouter/src
wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2
tar jxf gcc-4.9.1.tar.bz2 ;cd gcc-4.9.1
ldconfig
./configure -enable-threads=posix -disable-checking -disable-multilib -enable-languages=c,c++ -with-gmp -with-mpfr -with-mpc
make && make install
ldconfig


#CMAKE
cd /data/source/mcrouter/src
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
tar xvf cmake-2.8.12.2.tar.gz && cd cmake-2.8.12.2
./configure && make && make install


#AutoConf
cd /data/source/mcrouter/src
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xvf autoconf-2.69.tar.gz && cd autoconf-2.69
./configure && make && make install


#SCONS
cd /data/source/mcrouter/src
rpm -Uvh http://sourceforge.net/projects/scons/files/scons/2.3.3/scons-2.3.3-1.noarch.rpm


#Ragel
cd /data/source/mcrouter/src
wget http://www.colm.net/files/ragel/ragel-6.9.tar.gz
tar -zxvf ragel-6.9.tar.gz
cd ragel-6.9
./configure && make && make install


#Python27 for Boost
yum -y install centos-release-SCL
yum -y install python27
scl enable python27 "easy_install pip"


#Boost
scl enable python27 bash
python --version
cd /data/source/mcrouter/src
wget http://downloads.sourceforge.net/boost/boost_1_56_0.tar.bz2
tar jxf boost_1_56_0.tar.bz2 && cd boost_1_56_0
./bootstrap.sh --prefix=/usr && ./b2 stage threading=multi link=shared
./b2 install threading=multi link=shared
ldconfig


#Gflags
cd /data/source/mcrouter/src
wget https://github.com/schuhschuh/gflags/archive/v2.1.1.tar.gz
tar xzvf gflags-v2.1.1.tar.gz
mkdir -p gflags-2.1.1/build/ && cd gflags-2.1.1/build/
cmake .. -DBUILD_SHARED_LIBS:BOOL=ON -DGFLAGS_NAMESPACE:STRING=google && make && make install


#GLOG
cd /data/source/mcrouter/src
wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
tar xvf glog-0.3.3.tar.gz && cd glog-0.3.3
./configure && make && make install


#double-conversion for Folly
cd /data/source/mcrouter/src
git clone https://code.google.com/p/double-conversion/
cd double-conversion-master && scons install
ln -sf src double-conversion
ldconfig


#Folly
cd /data/source/mcrouter/src
git clone https://github.com/genx7up/folly.git
cd folly/folly/test
wget https://googletest.googlecode.com/files/gtest-1.6.0.zip
unzip gtest-1.6.0.zip
cd ../
autoreconf --install
export CPPFLAGS="-I/data/source/mcrouter/double-conversion"
./configure && make && make install


#McRouter
cd /data/source/mcrouter/src
git clone https://github.com/facebook/mcrouter.git
cd mcrouter/mcrouter
export CPPFLAGS="-I/data/source/mcrouter/double-conversion"
autoreconf --install
./configure && make && make install
mcrouter --help

 

PHP 二进制小端转大端

May 13th,2012 2 Comments
	function LbinToGbin($binarydata) {
		$hex = bin2hex($binarydata);

		$strlen = strlen($hex);
		$hex_arr = array();
		$j = 0;
		for($i=0; $i<$strlen; $i++){
			if($i%2 == 0){
				$hex_array[$j] = $hex[$i];
			}else{
				$hex_array[$j] .= $hex[$i];
				$j++;
			}
		}
		$hex_array = array_reverse($hex_array);
		foreach($hex_array as $v){
			$newhex .= $v;
		}

		$bin = "";
		$i = 0;
		do {
			$bin .= chr(hexdec($newhex{$i}.$newhex{($i + 1)}));
			$i += 2;
		} while ($i < strlen($newhex));
		return $bin;
	}

linux批量替换文件内容3种方法(perl,sed,shell)

Apr 12th,2012 No Comments

ctags: linux perl shell perl vi grep awk xargs 批量替换

方法1:

这两天在构建一个应用的使用用到了maven,由于project很大,足足有700多个 pom.xml文件,更郁闷的是在很多pom.xml文件里都单独指定了资源库的url,我需要把这些资源库的url统一指定到nexus本地中央库.
手 工一个个改文件配置有点不太实际,所以google了一下,找到批量替换文件内容的好方法,命令结构如下:
find -name ‘要查找的文件名’ | xargs perl -pi -e ‘s|被替换的字符串|替换后的字符串|g’下面这个例子就是将当前目录及所有子目录下的所有pom.xml文件中的”http://repo1.maven.org/maven2“ 替换为”http://localhost:8081/nexus/content/groups/public“.
find -name ‘pom.xml’ | xargs perl -pi -e ‘s|http://repo1.maven.org/maven2|http://localhost:8081/nexus/content /groups/public|g’这里用到了Perl语言,
perl -pi -e 在Perl 命令中加上-e 选项,后跟一行代码,那它就会像运行一个普通的Perl 脚本那样运行该代码.
从命令行中使用Perl 能够帮助实现一些强大的、实时的转换。认真研究正则表达式,并正确地使用,将会为您省去大量的手工编辑工作。
find -name ‘pom.xml’ | xargs perl -pi -e ‘s|http://repo1.maven.org/maven2|http://localhost:8081/nexus/content/groups/public|g’
Read More…