摘要: #include <iostream>using namespace std;#include <windows.h>#include <AtlBase.h>#include <AtlConv.h>int main(){ const char from[100] = "F:\\桌面\\test\\新建文本文档.txt"; char to[100] = "D:\\test.txt"; USES_CONVERSION; LPCWSTR pFrom = A2CW(from); LPCWSTR pTo = A2CW 阅读全文
posted @ 2011-09-10 18:45 吃吃户 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 设置带宽的命令tc qdisc del dev eth1 roottc qdisc add dev eth1 root handle 1: htb r2q 1tc class add dev eth1 parent 1: classid 1:1 htb rate 3000kbit burst 10k[root@chdvm ~]# tc class ls dev eth1class htb 1:1 root prio 0 rate 3000Kbit ceil 3000Kbit burst 10Kb cburst 1599b同时设置丢包和带宽。[root@chdvm ~]# tc qdisc de 阅读全文
posted @ 2011-06-19 17:14 吃吃户 阅读(4465) 评论(0) 推荐(0) 编辑
摘要: 先安装VirtualBox最新版的安装包: 进入rootsh VirtualBox-4.0.4-70112-Linux_x86.run命令行安装VirtualBox的扩展包(USB, VRDP…)进入rootVBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.4-70112.vbox-extpack即可。虚拟机设置VBoxManage modifyvm fc08 --vrde on --vrdeport 5008 --vrdeauthtype null --vrdemulticon on虚拟机启动命令VBoxHe 阅读全文
posted @ 2011-06-19 17:13 吃吃户 阅读(2028) 评论(0) 推荐(0) 编辑
摘要: root下service vncserver startchd下vncserver :1VNC的操作1.进入rootfedora安装VNCyum install vnc-server即可修改/etc/sysconfig/vncservers里面,去掉两个#。VNCSERVERS=”2:chd”2.进入chd用户输入vncserver,提示输入密码修改~/.vnc/xstartup脚本把最后的显示改成 gnome &VNC,全称为Virtual Network Computing,它是一个桌面共享系统。它的功能,类似于windows中的远程桌面功能。VNC使用了RFB(Remote Fr 阅读全文
posted @ 2011-06-19 17:12 吃吃户 阅读(4458) 评论(0) 推荐(0) 编辑
摘要: 1.让linux具有转发包的功能,功能简单在中转节点上:vim /etc/rc.local中加入route add -net 10.0.0.0/24 dev eth3route add -net 127.20.0.0/24 dev eth4route add -net 192.168.0.0/24 dev eth5开启linux路由功能2008-12-18 19:49临时开启:echo "1" >/proc/sys/net/ipv4/ip_forward永久开启:vi /etc/sysctl.confnet.ipv4.ip_forward=1这样每次开机/proc/s 阅读全文
posted @ 2011-06-19 17:10 吃吃户 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/iceocean/articles/1594183.html这个方法用于解决Ubuntu下更换网卡后,新网卡变更为eth1,并且源网卡的名称eth0,无法给新网卡用的情况。也可以用于为网卡更名。网卡MAC地址改变之后,在Linux中找到网卡,新的网卡会被识别为eth1或者更为靠后的网卡写入到/etc/udev/rules.d/70-persistent-net.rules这个文件中,修改/etc/udev/rules.d/70-persistent-net.rules这个文件,将eth0的MAC地址修改为改变后的地址就可以。编辑/etc/ud 阅读全文
posted @ 2011-06-19 16:30 吃吃户 阅读(3112) 评论(0) 推荐(0) 编辑
摘要: 转自:http://hi.baidu.com/benmaoer/blog/item/54c6e924cb7bc10a4d088d80.html根据inode 来修改或删除linux 下乱码的文件1. 创建测试文件: touch 1?.txt2. 查询inode :[oracle@test]$ ll -itotal 1469445217956913 -rw-r--r-- 1 oracle oinstall 0 Jan 18 20:24 1?.txt3. 修改测试文件名:find . -inum 17956913 -exec mv {} file.txt \;4. 检查修改结果[oracle@te 阅读全文
posted @ 2011-06-19 16:29 吃吃户 阅读(6195) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash functionf(){ sleep"$1" echo"$1" } while[-n"$1"] do f"$1"& shift done wait exampleusage: ./sleepsort.bash536363147转自:http://bbs.seu.edu.cn/bbstcon.php?board=Linux&gid=41215 阅读全文
posted @ 2011-06-18 16:07 吃吃户 阅读(248) 评论(0) 推荐(0) 编辑