Linux下使用一些常用的svn命令

1. 更新svn

svn up, 运行该命令后的状态有:

A Added
D Deleted
U Updated
C Conflict
G Merged

如果出现C的话,一定要自己解决冲突,否则的话提交不了;

手动解决掉冲突后,需要运行svn resolved命令,将冲突的

版本文件删除掉。

2. 第一次从svn server上下载source

svn checkout svn://ipaddress/your_repo

svn co svn://ipaddress/your_repo

svn checkout http(s)://ipaddress/your_repo

svn co http(s)://ipaddress/your_repo

3. 给svn追加新的文件

svn add yourfile

svn commit

4. 从svn删除文件

svn delete yourfile

svn commit

5. 本地文件的状态

svn status, 运行该命令后的状态有:

‘ ‘ No modifications.
‘A’ Item is scheduled for Addition.
‘D’ Item is scheduled for Deletion.
‘M’ Item has been modified.
‘R’ Item has been replaced in your working copy. This means the file was
scheduled for deletion, and then a new file with the same name was scheduled
for addition in its place.
‘C’ The contents (as opposed to the properties) of the item conflict with
updates received from the repository.
‘X’ Item is related to an externals definition.
‘I’ Item is being ignored (e.g. with the svn:ignore property).
‘?’ Item is not under version control.
‘!’ Item is missing (e.g. you moved or deleted it without using svn). This
also indicates that a directory is incomplete (a checkout or update was
interrupted).
‘~’ Item is versioned as one kind of object (file, directory, link), but has
been replaced by different kind of object.

参见:

http://www.linuxfromscratch.org/blfs/edguide/chapter03.html

telnet中的-8E选项

注意-8E的选项只有在linux机器上有,在windows自带的telnet客户端上没有。

通过-8E连接的telent,可以grep中文,日文字符

telnet -8E hostname

-8E
-8 Request 8-bit operation. This causes an attempt to negotiate the
TELNET BINARY option for both input and output. By default telnet
is not 8-bit clean.

-E Disables the escape character functionality; that is, sets the
escape character to no character’’.

如果使用了escape character,那么在telnet时输入escape character字符会进入command mode,
如下:
[jial@nsw-s-hostserver ~]$ telnet 1.1.1.1 -e d
Telnet escape character is ‘d’.
Trying 1.1.1.1…
Connected to 1.1.1.1.
Escape character is ‘d’.
Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
login:
telnet > ?
Commands may be abbreviated. Commands are:

close close current connection
logout forcibly logout remote user and close the connection
display display operating parameters
mode try to enter line or character mode (‘mode ?’ for more)
open connect to a site
quit exit telnet
send transmit special characters (‘send ?’ for more)
set set operating parameters (‘set ?’ for more)
unset unset operating parameters (‘unset ?’ for more)
status print status information
toggle toggle operating parameters (‘toggle ?’ for more)
slc change state of special charaters (‘slc ?’ for more)
auth turn on (off) authentication (‘auth ?’ for more)
encrypt turn on (off) encryption (‘encrypt ?’ for more)
forward turn on (off) credential forwarding (‘forward ?’ for more)
z suspend telnet
! invoke a subshell
environ change environment variables (‘environ ?’ for more)
? print help information
telnet>

参见:

http://man.he.net/man1/telnet
http://linux.about.com/od/commands/l/blcmdl1_telnet.htm

sony ericsson dbk file 的查看

1. 将.dbk备份
2. 将.dbk文件重命名为.zip文件
3. 用解压工具将它解压缩
4. 在解压的目录中会看到一个名字为contacts.vcf的文件,它就是备份的通讯录文件
5. 用简单的shell对它进行处理,就可以得到我们的通讯录
5.1 将我们的通讯录放到一台linux上,运行
grep -A1 FN contact.txt | awk ‘BEGIN {FS=”:”} {print $2}’
5.2 生产的结果例子如下:
=E5=BC=A0=E4=B8=89
13999999999

=E6=9D=8E=E5=9B=9B
15802999999
5.3 然后将结果copy到notepad++中,将QUOTED-PRINTABLE编码转回来(Plugins –> MIME tools Quoted-
printable Decode);如下:
张三
13999999999

李四
15802999999

linux 下fdisk的使用

以下是一个实际的例子,请各位参考:

nx[root@test]# fdisk –l ( 显示所有的磁盘和分区 )

Disk /dev/sda: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 1 7 56196 12 Compaq diagnostics

/dev/sda2 * 8 20 104422+ 83 Linux

Disk /dev/sdb: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 * 1 13054 104856223+ 83 Linux

Disk /dev/sdc: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

[root@test]# fdisk /dev/sdc ( 对磁盘 /dev/sdc 进行分区等设置 )

The number of cylinders for this disk is set to 36472.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p ( 打印出当前磁盘的分区表 )

Disk /dev/sdc: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): m ( 打印帮助 )

Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition

l list known partition types

m print this menu

n add a new partition

o create a new empty DOS partition table

p print the partition table

q quit without saving changes

s create a new empty Sun disklabel

t change a partition’s system id

u change display/entry units

v verify the partition table

w write table to disk and exit

x extra functionality (experts only)

Command (m for help): n ( 添加一个分区,注意:如果 /dev/sdc
是一个没有分区的磁盘的话,必须先创建一个
primary partition 分区 )

Command action

e extended

p primary partition (1-4)

p ( 创建主分区 )

Partition number (1-4): ( 这里没有输入合法的值 )

Value out of range.

Partition number (1-4): 1 ( 分区的编号是 1)

First cylinder (1-36472, default 1): ( 分区的起始位置,默认值是 1)

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-36472, default 36472):
+51200M ( 分区的大小是 50G)

Command (m for help): p ( 打印分区表,检查刚才创建的分区是否正确 )

Disk /dev/sdc: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 1 6226 50010313+ 83 Linux

Command (m for help): w ( 将刚才创建的信息写入磁盘,使之生效 )

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@test]# fdisk -l

Disk /dev/sda: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 1 7 56196 12 Compaq diagnostics

/dev/sda2 * 8 20 104422+ 83 Linux

Disk /dev/sdb: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 * 1 13054 104856223+ 83 Linux

Disk /dev/sdc: 300.0 GB, 300000000000 bytes

255 heads, 63 sectors/track, 36472 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 1 6226 50010313+ 83 Linux

[root@test]# mkfs.ext3 -b 4096 /dev/sdc1 ( 在刚才创建好的
/dev/sdc1
分区上,建立 ext3 文件系统 )

mke2fs 1.39 (29-May-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

6258688 inodes, 12502578 blocks

625128 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

382 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks:

10.43.118.16532768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208,

10.43.118.1654096000, 7962624, 11239424

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

[root@test]# df ( 查看当前文件系统的磁盘使用量 )

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sdb1 101572540 3943032 92386700 5% /

/dev/sda2 101105 10452 85432 11% /boot

tmpfs 8219868 0 8219868 0% /dev/shm

[root@test]# mkdir /base

[root@test]# mount /dev/sdc1 /base ( /dev/sdc1
挂到
/base )

[root@test]# df

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sdb1 101572540 3943032 92386700 5% /

/dev/sda2 101105 10452 85432 11% /boot

tmpfs 8219868 0 8219868 0% /dev/shm

/dev/sdc1 49224712 184332 46539868 1% /base

完成以上工作后,就可以使用文件系统了,但是如果想要在系统启动之后,自动 mount 自己的分区,需要修改 /etc/fstab ,在最后追加一行:

/dev/sdc1 /base ext3 defaults 1 2

每列的具体含义可参见:

http://www.ghacks.net/2009/01/03/understanding-linux-etcfstab/

http://en.wikipedia.org/wiki/Fstab

以下方法参见:

http://www.cyberciti.biz/faq/linux-disk-format/

http://www.idevelopment.info/data/Unix/Linux/LINUX_PartitioningandFormattingSecondHardDrive_ext3.shtml

fedora 9下ftp,telnet的安装和设置

因为ftp和telnet没有默认安装,所以需要自己安装和配置:
1.先行条件
设置代理(如果不是通过代理上网的,可以跳过这一步):
进入代理面板,System–>Preferences–>Internet and Network–>Network Proxy
设置自己的代理和Ignore Host List;

禁用auto update:
进入Update面板,System–>Preferences–>System–>Software Updates
在Check for updates:中选择Never;

导入Fedora Project的公钥(yum用它来验证下载的rpm包的完整性和正确性):
rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY

2.使用yum(The Yellowdog Updater, Modified)安装vsftpd:
[root@localhost ~]# yum list | grep vsftpd
system-config-vsftpd.noarch 0.4.5-3.fc9 fedora
vsftpd.i386 2.0.6-3.fc9 fedora
(最后一列fedora,表示安装包在远端的fedora服务器上,可以安装)
[root@localhost ~]# yum install vsftpd
[root@localhost ~]# yum list | grep vsftpd
vsftpd.i386 2.0.6-3.fc9 installed
(最后一列installed,表示已经安装)
[root@localhost ~]# service vsftpd start

3.使用yum安装telnet-server:
[root@localhost ~]# yum list | grep telnet-server
telnet-server.i386 1:0.17-42.fc9 fedora
[root@localhost ~]# yum install telnet-server
[root@localhost ~]# chkconfig telnet on
[root@localhost ~]# service xinetd start
Starting xinetd: [ OK ]
(因为telnet是xinetd服务的一部分,只要启动它就可以)

注1:如果在运行yum时提示以下错误,使用kill -9 pid,将对应的进程杀掉;
Existing lock /var/run/yum.pid: another copy is running as pid 9352.
Another app is currently holding the yum lock; waiting for it to exit…

注2:想让ftp,telnet等程序正常通信的话,最简单的方式是将linux的firewal关掉,
它位于System–>Administration–>Firewall;

注3:默认情况下,fedora中的ftp,telnet因为安全问题是不允许root用户登录的,
如果想让root使用telnet的话:
给文件/etc/securetty追加以下内容
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9
然后重新启动xinetd服务,它会允许10个root用户的session存在,注意,你自己在本地打开的
terminal也会占用pts的编号,想要查看那些pts被使用,可以使用who命令;
如果想让root使用ftp的话:
将下列两个文件中的root删除掉,重新启动vsftpd服务,就可以了.
/etc/vsftpd/ftpusers
/etc/vsftpd/user_list

opensolaris如何让网络设置持久化

IP的设置:

修改/etc/hostname.pcn0文件,注意这里.之后的名字是网卡的名字,不同的机器可能不一样;

例子:

cat /etc/hostname.pcn0

192.168.131.10/21

修改

route的设置:

修改/etc/defaultrouter文件,追加默认网关;

通过命令route -p add default X.X.X.X 来修改文件/etc/inet/static_routes;

例子:

cat /etc/inet/static_routes

File generated by route(1M) - do not edit.

default 192.168.128.1

关于网吧svod播放器的几个猜想

因为最近没事干,想到网吧copy一些电影看看,但是现在的很多网吧都进行了改造,使用svod播放器,

将自己的本来是存放在本地的电影进行了包装,使得我不能下载。于是找了一些工具发现以下东西,分享之。

(顺便说一句,多找几家网吧,不是每家都升级了,有些还是可以通过羊羊(//)来下载的)

这时他们的网站:http://www.omov8.com/

1.我去的两家网吧都是在svod的客户端进行了设置,使得打开网吧影院的网页指向一个**.cn的域名,其实不是的,

网页时连到本地的一个http server上的,具体的ip地址在svod的安装目录下,有一个open.html的文件,使用记事本

打开就可以看见;

2.使用port scanner,扫描这个ip,方式该机器开放了80和其他一些端口(网络共享);使用别的方法发现该机器大部分都是 win 2003;

3.svod播放器没有缓存;再者它根本就没有通过ie,所以你在ie的缓存目录是什么都看不到的;

4.svod的播放文件格式是rm的;

5.所以,如果想破解svod的话,有两个:

5.1破解win 2003的密码(好像不可行吧)

5.2自己编写一个程序,模拟svod,通过http请求将影片下载下来,然后将之重命名为*.rm文件即可;

当然前提是请求的数据流没有被加密;

6.他们把视频是通过卫星传到网吧,然后再通过网吧的视频服务器转到各各用户;

js相关

· JavaScript 网站

o http://www.javascript.com/ 号称最可靠的
javascript

o http://scriptsearch.internet.com/JavaScript/ 有很多 freesource
可以参考、使用

· JavaScript 的 Coding Style

o http://javascript.crockford.com/code.html

o https://blueprints.dev.java.net/bpcatalog/conventions/javascript-
recommendations.html

o http://dojotoolkit.org/js_style_guide.html

o https://developer.mozilla.org/ja/JavaScript_style_guide

· JavaScript Libraries

o 推荐(使用比 较 广泛,功能 强 大,有很多人 维护 ,文档比 较齐 全)

§ Dojo

§ Jquery

§ EXTJS ( 收 费 )

§ YUI

§ Prototype

o 其他(功能有限,可以参考学 习 ,如果引入的 话 , 还 是要 谨 慎点)

§ dhtmlgoodies

§ 40 Useful JavaScript Libraries ( 中文版: )

§ gRaphaël web vector graphics (MIT License)

§ Google Closure Library

· JavaScript 参考

o http://www.w3school.com.cn/

· JavaScript 工具

o JavaScript 调试 工具

§ Companion.JS <
http://www.cnitblog.com/yemoo/archive/2007/10/22/35190.html
>

§ Mozilla Venkman

§ javascript_debugger

§ javascript dump

o JavaScript 的 辅 助工具

§ Greasemonkey

§ IE Developer ToolBar?

o JavaScript 语 法 检查 工具

§ JSLint http://www.jslint.com/

§ JavaScript? Lint
http://www.javascriptlint.com/

o JavaScript UT 工具

§ JSUnit http://www.jsunit.net/

o JavaScript + HTML 内存泄露 检查 工具

§ Drip http://www.outofhanwell.com/ieleak/index.php?title=Main_Page

§ JavaScript Memory Leak Detector (V1)
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

§ JavaScript Memory Leak Detector (V2)
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector-v2.aspx

§ sIEve http://home.wanadoo.nl/jsrosman/

§ Leak Monitor (Firefox plugin) https://addons.mozilla.org/en-
US/firefox/addon/2490

o JavaScript Firefox 下 调试 工具

§ Firebug http://getfirebug.com/

o JavaScript Firefox 下 Cookie 监视 工具

§ Firecookie http://www.softwareishard.com/blog/firecookie/

DBMS各种SQL的分类

A Data Definition Language or Data Description Language ( DDL ) is
a computer language for defining data structures.

Examples of DCL commands include: create/drop/alter

Data Manipulation Language ( DML ) is a family of computer languages
used by computer programs and/or database users to insert, delete and update
data in a database.

Examples of DCL commands include: insert/delete/select/update

Data Control Language (DCL) is a computer language and a subset of SQL, used
to control access to data in a database.

Examples of DCL commands include: grant/revoke