Archive for 04月, 2006
Posted in ●Shell标签 | No Comments »
就是把下面的代码部分保存为“jpg改目录名.bash”文件。用
| 代码: |
| chmod +x jpg改目录名.bash |
修改成可执行文件。复制到~/.gnome2/nautilus-script/里面,这样就可以方便的修改,一次性把目录里面的jpg全部按照目录名排序改名。右键操作是很方便的。ln -s到/usr/bin里面也可以。终端下使用就方便点。下图是列子。

–>

以下是代码。
| 代码: |
#!/bin/bash#整理当前目录下的jpg图片名字,按照目录名字排序。
dir=`pwd`;dir=${dir##\/*\/}
num=0
for i in *.jpg *.JPG
do
#符合规则的文件不需要修改
if [ `expr match "$i" "${dir}-[0-9]*.[jpg|JPG]$”` != 0 ]; then
tmp=${i#”$dir”-}
tmp=${tmp%”.jpg”}
# echo ${tmp} ———————-
if [ "$tmp" -le "$num" ]; then
echo $i 符合规则,不修改。当前排序已到 $num。
continue
fi
fi
result=”$dir”-$num.jpg
#防止覆盖已有文件
while [ -e "$result" ]
do
((num++))
result=”$dir”-$num.jpg
done
# i=`echo $i | sed ’s/\ /\\\ /g’`
# result=`echo $result | sed ’s/\ /\\\ /g’`
# | sed ’s/\(/\\\(/g’ | sed ’s/\)/\\\)/g’
#实际操作改名了。
echo $i ‘->’ $result
mv “$i” “$result”
((num++))
done |
如果普通的文件名操作,就用rename算了。起码支持sed的那种s和y操作。其他的操作就麻烦些,都是perlexp的写法。Mastering Regular Expressions.pdf里面有perlexp的说明。复杂的。
Posted in ●Shell标签 | No Comments »
参数:t,tcp协议。c,连续显示
$ netstat -tc
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 218.76.45.187:53960 211.148.131.7:www TIME_WAIT
tcp 0 0 218.76.45.187:42122 kornbluth.freenode:ircd ESTABLISHED
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 218.76.45.187:53960 211.148.131.7:www TIME_WAIT
tcp 0 0 218.76.45.187:46000 m12-112.163.com:pop3 ESTABLISHED
tcp 0 1 218.76.45.187:37132 64.233.163.109:pop3s SYN_SENT
tcp 0 1 218.76.45.187:37131 64.233.163.109:pop3s SYN_SENT
tcp 0 0 218.76.45.187:42122 kornbluth.freenode:ircd ESTABLISHED
崽崽学会操作了。 星期二, 04月 25th, 2006
Posted in ◆帅帅 | No Comments »
经过几次的操作练习,终于今天学会了截图。
首先上来把我的opera关闭,再把终端关闭,然后另外开一个终端(我都不知道除开组合键以外,还有什么热键可以关闭窗口),测试了输入法,正常,然后截屏幕,取了个名字,再选桌面作为保存路径,保存了下来。
以下就是崽崽保存的文件。
| 代码: |
~$ ll Desktop/
总计 340
-rw-r–r– 1 exp exp 342491 2006-04-25 23:11 4777777777765555555556677777777777777777777777775555555555555555555555555555555555555555jg |
奇怪的是怎么还知道要输入jpg的扩展名,虽然是输入少了一个p和一个.,看来对图片格式也有点认识了。为了上传文件,我只好改成jpg的扩展名。要不论坛还不认识。

–>

Posted in ●Ubuntu标签 | No Comments »
GTK_IM_MODULE=scim 改为 GTK_IM_MODULE=XIM
14:26 Huahua eexpress: 可以在 /etc/X11/xinit/xinput.d/scim-pinyin 里改
但是还是没用。其实麻烦只是某些软件中老自动变成x输入法。导致不能输入。
现在的还是这样。都正常。
| 代码: |
$ cat /etc/X11/xinit/xinput.d/scim-pinyin|grep ^[^#]
XMODIFIERS=”@im=SCIM”
GTK_IM_MODULE=”scim”
QT_IM_MODULE=”scim”
XIM_PROGRAM=”/usr/bin/scim”
XIM_ARGS=”–daemon”
DEPENDS=scim-gtk2-immodule,scim-qtimm |
Posted in ●Ubuntu标签 | No Comments »
Serial Number History License Type then Date (default) Product then License Type Issue Date All licenses (default) Purchased and/or registered licenses Eval and beta licenses Issue Date Date Registered Serial Number License Type Product Qty of Product in Order Order ID Order Status 2006-03-28 2006-03-28 7433K-UL0VH-PG297-404UR Eval/Beta VMWare Server Beta for Windows N/A N/A N/A 2006-03-28 2006-03-28 7DL16-UJJLJ-N7Q30-43LHE Eval/Beta VMWare Server Beta for Linux N/A N/A N/A
反正现在不用vm。
Posted in ●Ubuntu标签 | No Comments »
方法如下 先到Abi的模板目录下 代码: cd /usr/share/AbiSuite-2.4/templates 备份 代码: sudo cp normal.awt-zh_CN normal.awt-zh_CN.backup 修改中文模板的默认字体 代码: sudo gedit normal.awt-zh_CN 找到 引用: font-family:Times New Roman; 把Times New Roman改成你所用的中文字体,如系统里默认的AR PL ShanHeiSun Un等。 保存,重新打开你的abiword,输入几个中文试试,应该就可以正常显示了的
原来的其他编码的中文文档,就没办法,只能进入后,全选,设置其他字体。
粘贴的bug。只能用无格式粘贴,否则中文就乱了。
安装编译环境 星期一, 04月 24th, 2006
Posted in ●Shell标签 | No Comments »
好多人要。就贴一个
| 代码: |
| sudo apt-get install build-essential sudo apt-get install gcc-3.4 sudo apt-get install linux-headers-`uname -r` export CC=gcc-3.4 |
Posted in ●Ubuntu标签 | No Comments »
1。复制驱动到打印模块目录
/usr/share/cups/model$ sudo cp ~/应用/HP-DeskJet_3740-hpijs.ppd .
2。重启打印服务
/etc/init.d$ sudo ./cupsys stop
/etc/init.d$ sudo ./cupsys start
结果不行。气死。
先记。
Posted in ●Opera标签 | No Comments »
修改 irc 聊天的样式。
/usr/share/opera/styles$ ll im.css
-rw-r–r– 1 root root 4260 2006-02-06 19:53 im.css
http://webtoman.com/opera/custom/custom_chat.php下载想要的css样式。
覆盖到/usr/share/opera/styles/im.css
修改部分样式。
| 代码: |
.self {
color: white;
font-weight:bolder;
text-align: right;
background: #802080;
}.self-message {
color: red;
font-weight:bolder;
} |

–>

| 代码: |
IRC Commands
/away [away message]
Sets you away with a message explaining that you are not currently paying attention to IRC. /away with no message sets you being back.
/clear
Clears all text in the current chat window.
/ctcp {nick} {ping|finger|version|time|userinfo|clientinfo}
Does the given ctcp request on nickname.
/invite {nick} {#channel}
Invites another user to a channel.
/ison {nick} {nick}
Used to determine if a certain user or users are currently on the IRC server based upon their nick.
/join {#channel}
Makes you join the specified channel.
/kick {#channel} {nick}
Kicks nick off a given channel.
/me {action text}
Sends the specifed ‘action’ to the current window.
/mode {#channel|nick} [[+|-]modechars [parameters]]
Sets channel or usermodes.
/motd [server address]
Displays the Message Of The Day from the server. Used alone it gives the message from the current server
/msg {nick|#channel} {message}
Send a (private) message to the nick/channel with the given text.
/nick {new nickname}
Changes your nickname to whatever you like.
/notice {nick} {message}
Send the specified notice message to the nick.
/part {#channel} [message]
Makes you leave the specified channel.
/ping {nick}
Pings the given nickname.
/query {nick} {message}
Open a query window to this user and send them the private message.
/quit [reason]
Disconnect you from IRC with the optional byebye message.
/raw {raw command}
Sends any raw command you supply directly to the server. Use with care!
/silence {+/-nick}
Stops/lets people send you private messages.
/slap {nick}
Produces the text “your-nick slaps a large trout around a bit with {nick}”
/time
Tells you the time on the server you use.
/topic {#channel} {newtopic}
Changes the topic for the specified channel.
/who {#channel}
Shows the nicks of all people on the given channel.
/who {*part.of.address*}
Shows all people on the IRC server with a matching address.
/whois {nick}
Shows information about the given nickname.
/whowas {nick}
Shows information about someone who -just- left IRC.Things in [square brackets] are optional, while things in {curly brackets} are mandatory
Send additions and corrections to toman<at>webtoman.com |