2010年8月25日

本文深入探讨了使用Putty设置SSH隧道穿越防火墙的技术,并指出了Shell编程中常见错误及其修正方法。此外,介绍了如何通过ClearCase更改文件权限模式,以及将WinMerge调整至更接近BeyondCompare的界面风格。
摘要由CSDN通过智能技术生成

继续备份一下其他Blog的内容。

1. SSH TUNNELING

使用Putty的时候,有事可以设置一下SSH Tunnels穿越防火墙的设置,只要有权限访问防火墙内某台机器的SSH服务,就可以访问防火墙内其他Server的端口了。原理图如下:

2010-01-12-02

Putty本地设置为L29492 + 10.170.30.161:29492,这样访问127.0.0.1:29492就可以连接到防火墙内部的10.170.30.161:29492端口了。

2. A Shell Programming Error

Last Friday, I made a mistake in a shell script which function is install license. I wrote following code to compare input parameter with a string:

if [ $1 = “-blabla” ]

If the input parameter is empty, it will cause a disaster. because it will be if [ = “-blabla” ] for shell.

So the correct code should be:

if [ “$1” = "-blabla” ]

or

if [ x$1 = “x-blabla” ]

3. How to change the permissions mode of a file in Clear Case

The default permission mode is read only after we add a new file to clearcase. But sometimes we need it to be an executable mode. Following command will be helpful when you want change the file’s permission mode.

cleartool protect –chmod filename

4. Make WinMerge looks similar to Beyond Compare

Since Beyond Compare Software is not free, we need use WinMerge instead of it. But it is a little hard to adapt the style from BC to WinMerge at the beginning. By changing some configuration in the ‘Options’, it can make WinMerge looks more similar to BC now.

1. Change the font to ‘Consolas’, Regular, 10

2. Ignore all whitespace

3. Change the color style. Difference and Word Difference’s Background to pink, and change Word Difference’s Text to Red.

4. View line numbers and view margins

Currently, I feel the life is more goodly than before.

image_thumb_023B1C93
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值