重装xp后恢复archlinux的GRUB

重装xp后恢复archlinux的GRUB

1 用archlinux光盘启动,进入到shell下
2 输入 grub
会出现这样的字符 
grub>
3
我们就可以在这样的字符后面,输入 
grub>root (hdX,Y) 
grub>setup (hd0) 
如果成功会有一个successful...... 
这里的X,如果是一个盘,就是0,如果你所安装的linux的根分区在第二个硬盘上,那X就是1了;
Y,就是装有linux系统所在的根分区。
setup (hd0)就是把GRUB写到硬盘的MBR上。 


如果不知道这个Y是多少,这也不要紧,先输入root (hd0,然后用[TAB]来查看,一下就明白了... 

操作如下:[前面开机启动的上面有说明] 

sh# grub 

会出现下面的字样的 

grub>

然后再这样操作,如果我知道我的linux装在第一个硬盘上,但我不知道装在哪个分区上,就可以先输入
root (hd0,    然后用[TAB]键来补齐,然后就明白了。 

grub>root (hd0,3) grub>setup (hd0) 安装成功。。。

/etc/fstab改错后的处理

今天不小心把/etc/fstab改错了, 系统重启後显示
Checking filesystems
。。。。。。。。。。。。。。。


***An error occured during the file system check.
***Dropping you to a shell; the system will reboot
***when you leave shell. up to 100000000 @ 8000-d000
Give root password for maintenance
(or type Control-D to continue);

于是只能输入root的password进入, vi 打开/etc/fstab之后, 恢复为原来的样子但是保存时提示
-- INSERT -- w10: Warning: Changing a readonly file
改完後保存的时候提示
"fstab" E212: Can't open file for writing
:w! 也没有用

看来是mount成readonly 了.
于是
root# mount -o remount,rw /

再试vi /etc/fstab, 就可以保存了.

批量循环修改文件内容脚本

find msnpoinew/ -type f | xargs perl -pi -e "s|http://img.mapbar.com/maplite/mapbank/msntype|http://10.10.10.15/msnpoinew|g"

find 0_0/ -type f | xargs perl -pi -e "s|lbp|test|g"

安装rtorrent linux命令行bt下载软件

linux命令行下的bt下载软件
1 准备:
1.curl http://curl.haxx.se/ rtorrent 依赖这个
2.sigc++-2.0 http://libsigc.sourceforge.net/ libtorrent 依赖这个
3.libtorrent http://libtorrent.rakshasa.no/ 这个是rtorrent到库
4.rtorrent http://libtorrent.rakshasa.no/ 这个是我们要装的

conky配置

background yes
font Monaco:size=8
xftfont Monaco:size=8
xftalpha 0.1

update_interval 1.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
minimum_size 220 5
maximum_width 220
#default_color d7d7d7
default_color 1A1A1A
default_shade_color black
default_outline_color black
alignment bottom_right
gap_x 10
gap_y 200
no_buffers yes
cpu_avg_samples 2
override_utf8_locale yes
uppercase no # set to yes if you want all text to be in uppercase
use_spacer no
out_to_console no

TEXT
${font Monaco:style=Bold:pixelsize=38}${alignc}${time %H:%M}${font Monaco:size=8}${time %m.%d/%Y}
SYSTEM ${hr 1 }

Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg
CPU ${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu1}%)
${cpubar 4 cpu1}
${cpugraph}
RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}
SWAP ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}

Highest CPU $alignr PID CPU% MEM%
${color black}${top name 1}$alignr${top pid 1}${top cpu 1}${top mem 1}
${top name 2}$alignr${top pid 2}${top cpu 2}${top mem 2}
${top name 3}$alignr${top pid 3}${top cpu 3}${top mem 3}

Highest MEM $alignr PID CPU% MEM%
${color black}${top_mem name 1}$alignr${top_mem pid 1}${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem pid 2}${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem pid 3}${top_mem cpu 3}${top_mem mem 3}

NETWORK ${addr eth0}${hr 1}${color}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}
disk r/w:${hr 1}${color}
${color black}${diskiograph 000000 5000a0}