Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
以下为引用内容:
这是开源中文字体前进的又一个坚实的脚印。v0.8“嬴政”采用了
12pt点阵国家标准;首次实现了点阵与矢量字体功能互补、共同使
用;补充了近千个新的符号点阵,修改优化了近万个汉字点阵;重
新绘制了11/12pt的拉丁字符;对空格和数字间隔也进行了优化,
提高中文ASCII Art显示效果;首次制作规范的DEB/RPM安装包,
实现了一个命令安装、设置自动完成……还有更多更多。
新版字体的下载地址参见:
http://wenq.org/index.cgi?BitmapSong
新字体的安装方法不再象以前那样繁琐,在文件浏览器中双击
相应的deb或rpm文件安装即可。也可以通过一个命令在命令行
实现安装:
代码:
sudo dpkg -i wqy-bitmapfont-0.8.0-6_all.deb
或者
代码:
sudo rpm -Uvh wqy-bitmapfont-0.8.0-6.noarch.rpm
再次感谢所有参与者,特别感谢eka, tchaikov, wanghong, fundawang, hzhsun.
via http://forum.ubuntu.org.cn/viewtopic.php?t=42811
[url=http://wqy.sourceforge.net/]http://wqy.sourceforge.net/[url]
Popularity: 13% [?]
Tags:
font,
wqy
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
totem 中文字幕问题
感谢 Huang Jiahua在源里做好的 xine-fonts-cn,直接在新立得中搜索安装 xine-fonts-cn 即可。甚至都不用配置 ~/.gnome2/totem_config 文件。这样即可解决 totem 支持 .srt 中文字幕的问题。
源里没有的话,直接用 xine-fonts-cn_0.1.2_all.deb 地址下载
注:srt 与 avi 同名,totem 会自动加载字幕;或者,把两个文件一起拖到 totem 窗口中;或者命令行
totem file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.avi#subtitle:file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.chs.srt
原理如下:
totem 使用的字体在 /usr/share/xine/libxin/fonts 中,而这里没有中文字体,所以字幕乱码或干脆不显示。需要 xine-fontconv 这个软件来制作所需的中文字体。
以下为引用内容:
一:添加源代码源:
sudo gedit /etc/apt/sources.list
增加
deb-src http://archive.ubuntu.com/ubuntu/ breezy main restricted universe multiverse
二:下载源代码,编译出 xine-fontconv :
sudo apt-get update
sudo apt-get source libxine1c2
cd xine-lib-1.0.1/misc/
sudo gcc -o /usr/local/bin/xine-fontconv xine-fontconv.c `freetype-config –cflags –libs`
三:生成中文字体
cd /usr/share/xine/libxine1/fonts
sudo xine-fontconv /usr/share/fonts/zh_CN/TrueType/SIMSUN.TTF simsun gb18030
四:修改totem的配置:
gedit ~/.gnome2/totem_config
找到中间的项目修改为:
subtitles.separate.font:simsun
subtitles.separate.src_encoding:gb18030
五:播放:
totem file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.avi#subtitle:file:///home/ubuntu/av/[地狱神探].Constantine.DVDRip.XviD.CD1-DoNE.chs.srt
via http://forum.ubuntu.org.cn/about2760.html
Mplayer 中文字幕
大约这样的命令格式
mplayer 影片名 -sub 字幕名 -subcp cp936 -font 中文字体名
中文字体名,就是类似 /media/hda1/WINDOWS/Fonts/simsun.ttc 这样(我的 windows 在 hda1)。我试验了
-font /usr/share/fonts/X11/misc/wenquanyi_12pt.pcf.gz
但是很卡。所以还是推荐 windows 的那些字体。下面是比较完整的例子
mplayer [肥皂].A.Soap.2006.LIMITED.DVDRip.XviD-MESS.avi -sub [肥皂].A.Soap.2006.LIMITED.DVDRip.XviD-MESS.srt -subcp cp936 -font /media/hda1/WINDOWS/Fonts/simsun.ttc
简写
mplayer *.avi -subcp cp936 -font /media/hda1/WINDOWS/Fonts/simsun.ttc
即可。但还avi和字幕要同名。
以下为引用内容:
mplayer 如果希望默认字体就支持中文
1、修改~/.mplayer/config文件中间的项目为:
font=/usr/share/fonts/zh_CN/TrueType/SIMSUN.TTF
subcp=cp936
2、修改`/.mplayer/gui.conf文件中间的项目为:
sub_auto_load = “yes”
sub_unicode = “yes”
sub_pos = “99″
sub_overlap = “no”
sub_cp = “cp936″
font_factor = “0.750000″
font_name = “/usr/share/fonts/zh_CN/TrueType/SIMSUN.TTF”
font_encoding = “unicode”
参考资料:
totem 观看 avi+src 中文字幕方法
guoshuang2007-11-06+把电影和字幕拖进 Kaffeine 窗口,在设置中 subtiltle 选择编码,中文一般是 gb18030。
Popularity: 27% [?]
Tags:
deb,
font,
gnome,
mplayer,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
错误信息 Error opening/initializing the selected video_out(-vo) device!
如果是在终端中敲命令的话
mplayer -vo x11 *.asf
如果用skin的话(必须保证有skin)
修改~.mplayer/gui.conf
找到相关选项,将其该为
vo_driver = “x11″
运行gmplayer
错误信息 Requested audio codec family [mp3] (afm=mp3lib) not available. enable it at compilation
# 開啟 Mplayer
# 在 Mplayer 上按右鍵 選 Preferences
# 切換到Codecs & Demuxer
# 找到 Audio codec family 選擇”FFmpeg/libavcodec audio decoders
# 按OK 重启 gmplayer
修復 Try adding “echo 1024 > /proc/sys/dev/rtc/max-user-freq” to your system startup scripts. 的方法有下列三種:
* echo 1024 > /proc/sys/dev/rtc/max-user-freq
* sysctl dev/rtc/max-user-freq=1024
* /etc/sysctl.conf 加入 dev/rtc/max-user-freq=1024
加了這個後, 若聲音會不同步, 建議就拿掉, 不然就在 mplayer 的 script 加入 -autosync 30 的參數
附上我的 ~/.mplayer/gui.conf 文件内容
enable_audio_equ = “no”
vo_driver = “x11″
vo_panscan = “0.000000″
vo_doublebuffering = “yes”
vo_direct_render = “no”
vo_dxr3_device = “/dev/em8300-0″
v_framedrop = “0″
v_flip = “0″
v_ni = “no”
v_idx = “-1″
a_afm = “ffmpeg”
vf_pp = “no”
vf_autoq = “0″
vf_lavc = “no”
ao_driver = “alsa”
ao_volnorm = “no”
softvol = “no”
ao_surround = “no”
ao_extra_stereo = “no”
ao_extra_stereo_coefficient = “1.000000″
dvd_device = “/dev/dvd”
cdrom_device = “/dev/cdrom”
osd_level = “1″
sub_auto_load = “yes”
sub_unicode = “no”
sub_pos = “100″
sub_overlap = “no”
sub_cp = “cp936″
font_factor = “0.750000″
font_name = “/media/hda1/WINDOWS/Fonts/simsun.ttc”
font_text_scale = “5.000000″
font_osd_scale = “6.000000″
font_blur = “2.000000″
font_outline = “2.000000″
Popularity: 22% [?]
Tags:
decode,
font,
ls,
mplayer,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
★ Beep Media Player
简单的播放器
★ Banshee
音乐管理和播放
Import, organize, play, and share your music using Banshee’s simple, powerful interface.
Rip CDs, play and sync your iPod, create playlists, and burn audio and MP3 CDs. Most portable music devices are supported.
★ Rhythmbox
带 Album 管理的播放器
★ Listen
据说是最好的音乐播放器。
A nice music player and manager for GNOME
With Listen you can:
- Play your favorite songs
- Manage your library
- Make playlists
- Automatically or manually download album covers
- Automatically synchronize album covers with iPod
- Easily burn an audio CD
- Directly get informations from wikipedia when you play a song
- See the lyrics of a song
- Have statistics about your favorite songs, albums or artists
- Listen to web radio
- Submit your songs to Audioscrobbler
- Quick access to last.fm related file
★ XMMS
老牌播放器,现在显得有点过时了。
★ quod libet
★ amarok
KDE下的播放器。功能强大。我喜欢它的 win+b 下一首歌快捷键,以及显在在系统托盘功能。
★ Muine Music Player
简洁、舒适的播放器
★ mplayer
强大的播放器,甚至可以在tty终端中播放。就是图形界面差了些。
★ kaffeine
KDE 音乐播放器。
★ Juk
KDE 播放器
★ Quod Libet
Quod Libet is a GTK+-based audio player written in Python. It’s designed around the idea that you know how to organize your music better than we do. It lets you make playlists based on regular expressions (don’t worry, regular searches work too). It lets you display and edit any tags you want in the file. And it lets you do this for all the file formats it supports — Ogg Vorbis, FLAC, MP3, Musepack, and MOD.
★ exaile
★ Exaile
is a music player aiming to be similar to KDE’s Amarok, but for GTK+ and written in Python.
★Decibel Audio Player
Decibel Audio Player is a GTK+ open-source (GPL license) audio player designed for GNU/Linux, which aims at being very straightforward to use by mean of a very clean and user friendly interface. It is especially targeted at Gnome and will follow as closely as possible the Gnome HIG.
相关日志:
linux mp3 中文乱码问题
ubuntu 媒体
Guide to Best Linux [Ubuntu (GNOME)] Applications
ubuntu 下中文字幕问题
ubuntu 下让 totem 播放 rmvb
ubuntu feisty amd64 播放 rmvb 问题
Popularity: 63% [?]
Tags:
amd64,
blog,
cat,
design,
feisty,
font,
gnome,
hp,
linux,
mplayer,
rmvb,
tty,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
单色
# Monochrome: Renders fonts in black and
white only. The edges of characters might appear jagged in some cases because
the characters are not antialiased. Antialiasing is
an effect that is applied to the edges of characters to make the characters
look smoother.
最佳形状(普通CRT显示器)
#Best shapes: Antialiases fonts where
possible. Use this option for standard Cathode Ray Tube (CRT) monitors.
最佳对比
#Best contrast: Adjusts fonts to give
the sharpest possible contrast, and also antialiases fonts, so that characters
have smooth edges. This option might enhance the accessibility of the GNOME
Desktop to users with visual impairments.
次像素平滑(液晶显示器)
#Subpixel smoothing (LCDs): Uses techniques
that exploit the shape of individual Liquid Crystal Display (LCD) pixels to
render fonts smoothly. Use this option for LCD or flat-screen displays.
Popularity: 20% [?]
Tags:
cat,
font,
gnome,
ls,
screen,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
Global Regular ExPression 文本搜索工具。
相关资料:
介绍一款强大的文档搜索工具——grep
windows 下的 grep 工具有 wingrep 和 powergrep

The name comes from a command in the Unix text editor ed that takes the form:
g/re/p
This means “search globally for matches to the regular expression re, and print lines where they are found”.
http://www.wingrep.com/
PowerGREP is a powerful Windows grep tool. Quickly search through large numbers of files on your PC or network, including text and binary files, compressed archives, MS Word documents, Excel spreadsheets and PDF files, etc. Find the information you want with powerful text patterns (regular expressions) specifying the form of what you want, instead of literal text. Search and replace with one or many regular expressions to comprehensively maintain web sites, source code, reports, etc. Extract statistics and knowledge from logs files and large data sets.
http://www.powergrep.com
Popularity: 14% [?]
Tags:
blog,
font,
unix
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
原文 How To Create A Local Debian/Ubuntu Mirror With apt-mirror
类似 windows 系统的SUS机制,ubuntu如果在公司范围内大量使用,到外网重复下载、update,费时费力…
笔记如下:
1. In my tests I mirrored the main, contrib, and non-free sections of Debian Sarge and the main, restricted, and universe sections of Ubuntu Edgy Eft which took about 25GB of hard disk space and about 6 hours of download time on a 16MBit DSL line.
I will not mirror security updates in this tutorial - I think it’s a good idea to always download security updates directly from the internet. That way you can be sure you get the latest ones.
不包括security的源目前大约25G。
2. This step is for all systems (Debian and Ubuntu). To install apt-mirror, please run
apt-get install apt-mirror
安装 apt-mirror
3. Later on, I want to access my new local Debian/Ubuntu mirror over http, therefore I install the Apache web server now:
apt-get install apache2
The default document root is /var/www, I will create symlinks from that directory to the location of the Debian and Ubuntu repository later on.
安装 apache2,后面再加入 symlinks。
4. apt-mirror’s configuration file is /etc/apt/mirror.list. There should already be a default configuration in it;On Ubuntu Edgy Eft, the file looks like this:
############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch
set nthreads 20
set tilde 0
#
############# end config ##############
deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse
clean http://archive.ubuntu.com/ubuntu
Please note that I used ftp.de.debian.org instead of ftp.fi.debian.org and de.archive.ubuntu.com instead of archive.ubuntu.com. You should use mirrors that are close to you, so if you are in the U.S., for example, replace de with us, and so on.
The cleaning section at the end tells apt-mirror in which directories on the local hard disk it should check to see if hard disk space can be freed. I want to check the whole local repositories for both Debian and Ubuntu, therefore I specify
clean http://ftp.de.debian.org/
clean http://de.archive.ubuntu.com/
If you want to use other Debian/Ubuntu versions, simply replace sarge with etch or sid and edgy with breezy, dapper, etc.
5. Create The Local Repositories 创建本地源
Now that apt-mirror is configured, it’s time to run it for the first time and download all the packages that form the local Debian and Ubuntu repository. All we have to do is type
su - apt-mirror -c apt-mirror
apt-mirror tells you how many GB it must download. This can take a few hours, so be patient. The packages will be stored in subdirectories of the /var/spool/apt-mirror/mirror directory, so make sure the partition that holds that directory has enough disk space left.
The Debian repository will be in /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian, and the Ubuntu repository will be in /var/spool/apt-mirror/mirror/de.archive.ubuntu.com/ubuntu. If you used different mirrors in chapter 4, the paths will be a little bit different for you.
6. Clean Up The Local Repositories 清理本地源
After apt-mirror has finished downloading all packages, it will most likely tell you can free up some disk space with the /var/spool/apt-mirror/var/clean.sh script. That’s what we do now:
/bin/bash /var/spool/apt-mirror/var/clean.sh
The output will look like this:
server1:~# /bin/bash /var/spool/apt-mirror/var/clean.sh
Removing 157 unnecessary files [13316096 bytes]…
[0%]…………….done.
Removing 18 unnecessary directories…
[0%]………………done.
As you see, some MB have been freed.
7. Update The Local Repositories / Create A Daily Cron Job
更新本地源/创建cron计划任务
Updating the local mirror is easy. Simply run
su - apt-mirror -c apt-mirror
again.
If you don’t want to do it manually, you can create a daily cron job for it. Simply edit /etc/cron.d/apt-mirror and uncomment the last line in it so that it looks like this:
vi /etc/cron.d/apt-mirror
#
# Regular cron jobs for the apt-mirror package
#
0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log
This will make apt-mirror run at 4.00h each day, and it will log to /var/spool/apt-mirror/var/cron.log.
8. Make The Local Mirrors Accessible Over HTTP
创建http访问
The default Apache document root under Debian and Ubuntu is /var/www, but our repositories are stored in /var/spool/apt-mirror/mirror. In order to make our repositories accessible by http://192.168.0.100/debian and http://192.168.0.100/ubuntu (in this tutorial 192.168.0.100 is the IP address of our local mirror), we create the symlinks /var/www/debian and /var/www/ubuntu that point to the real repositories:
ln -s /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian /var/www/debian
ln -s /var/spool/apt-mirror/mirror/de.archive.ubuntu.com/ubuntu /var/www/ubuntu
Remember to adjust these commands if you use different mirrors than ftp.de.debian.org and de.archive.ubuntu.com.
The next thing to consider is that you can refer to Debian Sarge as sarge, but also as stable (at the time of this writing Debian Sarge is stable and the upcoming Debian Etch still testing). When you run
ls -l /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian/dists
you will see that there is a directory called sarge, but not stable. If you use stable instead of sarge in /etc/apt/sources.list or install a new Debian system with the local mirror, this is a problem (the Debian Sarge installer also refers to stable instead of sarge). The solution is to create a symlink:
cd /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian/dists
ln -s sarge/ stable
Remember to adjust this command if you use a different mirror than ftp.de.debian.org.
At the time Debian Etch becomes stable and you decide to mirror Etch as well, don’t forget to change the stable symlink, e.g. like this:
cd /var/spool/apt-mirror/mirror/ftp.de.debian.org/debian/dists
rm -f stable
ln -s etch/ stable
We don’t have this problem with Ubuntu as there’s no stable, only breezy, dapper, edgy, etc.
9. 配置 Ubuntu Edgy Eft 使用本地源
On Ubuntu Edgy Eft systems, you can replace the main restricted universe repository in /etc/apt/sources.list like this:
vi /etc/apt/sources.list
…
deb http://192.168.0.100/ubuntu/ edgy main restricted universe
…
Afterwards, run
apt-get update
Fresh Installation 初次安装设置源,参考下图


更多资料:
http://apt-mirror.sourceforge.net
Popularity: 17% [?]
Tags:
cat,
deb,
font,
install,
ls,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
安装
查看软件xxx安装内容
dpkg -L xxx
查找软件
apt-cache search 正则表达式
查找文件属于哪个包
dpkg -S filenameapt-file search filename
查询软件xxx依赖哪些包
apt-cache depends xxx
查询软件xxx被哪些包依赖
apt-cache rdepends xxx
增加一个光盘源
sudo apt-cdrom add
系统升级
sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgrade
清除所以删除包的残余配置文件
dpkg -l |grep ^rc|awk ‘{print $2}’ |tr ["\n"] [" "]|sudo xargs dpkg -P -
编译时缺少h文件的自动处理
sudo auto-apt run ./configure
查看安装软件时下载包的临时存放目录
ls /var/cache/apt/archives
备份当前系统安装的所有包的列表
dpkg –get-selections | grep -v deinstall > ~/somefile
从上面备份的安装包的列表文件恢复所有包
dpkg –set-selections < ~/somefilesudo dselect
清理旧版本的软件缓存
sudo apt-get autoclean
清理所有软件缓存
sudo apt-get clean
删除系统不再使用的孤立软件
sudo apt-get autoremove
系统
查看内核
uname -a
查看Ubuntu版本
cat /etc/issue
查看内核加载的模块
lsmod
查看PCI设备
lspci
查看USB设备
lsusb
查看网卡状态
sudo ethtool eth0
查看CPU信息
cat /proc/cpuinfo
显示当前硬件信息
lshw
硬盘
查看硬盘的分区
sudo fdisk -l
查看IDE硬盘信息
sudo hdparm -i /dev/hda
查看STAT硬盘信息
sudo hdparm -I /dev/sda或sudo apt-get install blktoolsudo blktool /dev/sda id
查看硬盘剩余空间
df -hdf -H
查看目录占用空间
du -hs 目录名
优盘没法卸载
syncfuser -km /media/usbdisk
内存
查看当前的内存使用情况
free -m
进程
查看当前有哪些进程
ps -A
中止一个进程
kill 进程号(就是ps -A中的第一列的数字)或者 killall 进程名
强制中止一个进程(在上面进程中止不成功的时候使用)
kill -9 进程号或者 killall -9 进程名
图形方式中止一个程序
xkill 出现骷髅标志的鼠标,点击需要中止的程序即可
查看当前进程的实时状况
top
查看进程打开的文件
lsof -p
ADSL
配置 ADSL
sudo pppoeconf
ADSL手工拨号
sudo pon dsl-provider
激活 ADSL
sudo /etc/ppp/pppoe_on_boot
断开 ADSL
sudo poff
查看拨号日志
sudo plog
如何设置动态域名
#首先去 http://www.3322.org 申请一个动态域名#然后修改 /etc/ppp/ip-up 增加拨号时更新域名指令sudo vim /etc/ppp/ip-up#在最后增加如下行w3m -no-cookie -dump ‘http://username:password@members.3322.org/dyndns/update?system=dyndns&hostname=yourdns.3322.org’
网络
根据IP查网卡地址
arping IP地址
查看当前IP地址
ifconfig eth0 |awk ‘/inet/ {split($2,x,”:”);print x[2]}’
查看当前外网的IP地址
w3m -no-cookie -dump www.ip138.com|grep -o ‘[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}’w3m -no-cookie -dump www.123cha.com|grep -o ‘[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}’w3m -no-cookie -dump ip.loveroot.com|grep -o ‘[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}’
查看当前监听80端口的程序
lsof -i :80
查看当前网卡的物理地址
arp -a | awk ‘{print $4}’ifconfig eth0 | head -1 | awk ‘{print $5}’
立即让网络支持nat
sudo echo 1 > /proc/sys/net/ipv4/ip_forwardsudo iptables -t nat -I POSTROUTING -j MASQUERADE
查看路由信息
netstat -rnsudo route -n
手工增加删除一条路由
sudo route add -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1sudo route del -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1
修改网卡MAC地址的方法
sudo ifconfig eth0 down #关闭网卡sudo ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE #然后改地址sudo ifconfig eth0 up #然后启动网卡
统计当前IP连接的个数
netstat -na|grep ESTABLISHED|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r -nnetstat -na|grep SYN|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r -n
统计当前20000个IP包中大于100个IP包的IP地址
tcpdump -tnn -c 20000 -i eth0 | awk -F “.” ‘{print $1″.”$2″.”$3″.”$4}’ | sort | uniq -c | sort -nr | awk ‘ $1 > 100 ‘
屏蔽IPV6
echo “blacklist ipv6″ | sudo tee /etc/modprobe.d/blacklist-ipv6
服务
添加一个服务
sudo update-rc.d 服务名 defaults 99
删除一个服务
sudo update-rc.d 服务名 remove
临时重启一个服务
/etc/init.d/服务名 restart
临时关闭一个服务
/etc/init.d/服务名 stop
临时启动一个服务
/etc/init.d/服务名 start
设置
配置默认Java使用哪个
sudo update-alternatives –config java
修改用户资料
sudo chfn userid
给apt设置代理
export http_proxy=http://xx.xx.xx.xx:xxx
修改系统登录信息
sudo vim /etc/motd
中文
转换文件名由GBK为UTF8
sudo apt-get install convmvconvmv -r -f cp936 -t utf8 –notest –nosmart *
转换文件内容由GBK为UTF8
iconv -f gbk -t utf8 $i > newfile
转换 mp3 标签编码
sudo apt-get install python-mutagenfind . -iname “*.mp3” -execdir mid3iconv -e GBK {} \;
控制台下显示中文
sudo apt-get install zhcon使用时,输入zhcon即可
文件
快速查找某个文件
whereis filename
find 目录 -name 文件名
查看文件类型
file filename
显示xxx文件倒数6行的内容
tail -n 6 xxx
让tail不停地读地最新的内容
tail -n 10 -f /var/log/apache2/access.log
查看文件中间的第五行(含)到第10行(含)的内容
sed -n ‘5,10p’ /var/log/apache2/access.log
查找包含xxx字符串的文件
grep -l -r xxx .
查找关于xxx的命令
apropos xxxman -k xxx
通过ssh传输文件
scp -rp /path/filename username@remoteIP:/path #将本地文件拷贝到服务器上scp -rp username@remoteIP:/path/filename /path #将远程文件从服务器下载到本地
查看某个文件被哪些应用程序读写
lsof 文件名
把所有文件的后辍由rm改为rmvb
rename ’s/.rm$/.rmvb/’ *
把所有文件名中的大写改为小写
rename ‘tr/A-Z/a-z/’ *
删除特殊文件名的文件,如文件名:–help.txt
rm — –help.txt 或者 rm ./–help.txt
查看当前目录的子目录
ls -d */. 或 echo */.
将当前目录下最近30天访问过的文件移动到上级back目录
find . -type f -atime -30 -exec mv {} ../back \;
将当前目录下最近2小时到8小时之内的文件显示出来
find . -mmin +120 -mmin -480 -exec more {} \;
删除修改时间在30天之前的所有文件
find . -type f -mtime +30 -mtime -3600 -exec rm {} \;
查找guest用户的以avi或者rm结尾的文件并删除掉
find . -name ‘*.avi’ -o -name ‘*.rm’ -user ‘guest’ -exec rm {} \;
查找的不以java和xml结尾,并7天没有使用的文件删除掉
find . ! -name *.java ! -name ‘*.xml’ -atime +7 -exec rm {} \;
统计当前文件个数
ls /usr/bin|wc -w
统计当前目录个数
ls -l /usr/bin|grep ^d|wc -l
显示当前目录下2006-01-01的文件名
ls -l |grep 2006-01-01 |awk ‘{print $8}’
压缩
解压缩 xxx.tar.gz
tar -zxvf xxx.tar.gz
解压缩 xxx.tar.bz2
tar -jxvf xxx.tar.bz2
压缩aaa bbb目录为xxx.tar.gz
tar -zcvf xxx.tar.gz aaa bbb
压缩aaa bbb目录为xxx.tar.bz2
tar -jcvf xxx.tar.bz2 aaa bbb
Nautilus
显示隐藏文件
Ctrl+h
显示地址栏
Ctrl+l
特殊 URI 地址
* computer:/// - 全部挂载的设备和网络* network:/// - 浏览可用的网络* burn:/// - 一个刻录 CDs/DVDs 的数据虚拟目录* smb:/// - 可用的 windows/samba 网络资源* x-nautilus-desktop:/// - 桌面项目和图标* file:/// - 本地文件* trash:/// - 本地回收站目录* ftp:// - FTP 文件夹* ssh:// - SSH 文件夹* fonts:/// - 字体文件夹,可将字体文件拖到此处以完成安装* themes:/// - 系统主题文件夹
查看已安装字体
在nautilus的地址栏里输入”fonts:///“,就可以查看本机所有的fonts
程序
详细显示程序的运行信息
strace -f -F -o outfile
日期和时间
设置日期
#date -s mm/dd/yy
设置时间
#date -s HH:MM
将时间写入CMOS
hwclock –systohc
读取CMOS时间
hwclock –hctosys
从服务器上同步时间
sudo ntpdate time.nist.gov
控制台
不同控制台间切换
Ctrl + ALT + ←Ctrl + ALT + →
指定控制台切换
Ctrl + ALT + Fn(n:1~7)
控制台下滚屏
SHIFT + pageUp/pageDown
控制台抓图
setterm -dump n(n:1~7)
数据库
mysql的数据库存放在地方
/var/lib/mysql
从mysql中导出和导入数据
mysqldump 数据库名 > 文件名 #导出数据库mysqladmin create 数据库名 #建立数据库mysql 数据库名 < 文件名 #导入数据库
忘了mysql的root口令怎么办
sudo /etc/init.d/mysql stopsudo mysqld_safe –skip-grant-tables &sudo mysqladmin -u user password ‘newpassword’’sudo mysqladmin flush-privileges
修改mysql的root口令
sudo mysqladmin -uroot -p password ‘你的新密码’
其它
下载网站文档
wget -r -p -np -k http://www.21cn.com· -r:在本机建立服务器端目录结构;· -p: 下载显示HTML文件的所有图片;· -np:只下载目标站点指定目录及其子目录的内容;· -k: 转换非相对链接为相对链接。
如何删除Totem电影播放机的播放历史记录
rm ~/.recently-used
如何更换gnome程序的快捷键
点击菜单,鼠标停留在某条菜单上,键盘输入任意你所需要的键,可以是组合键,会立即生效;如果要清除该快捷键,请使用backspace
vim 如何显示彩色字符
sudo vim /etc/vim/vimrc找到 ” syntax on 的行,去掉前面的注释符号 ” 。
如何在命令行删除在会话设置的启动程序
cd ~/.config/autostartrm 需要删除启动程序
如何提高wine的反应速度
sudo sed -ie ‘/GBK/,/^}/d’ /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
via http://vigonow.bokee.com/6119687.html
Popularity: 26% [?]
Tags:
cat,
font,
gnome,
install,
ls,
rmvb,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments
Graphics:
* The GIMP - free software replacement for Adobe Photoshop
* F-Spot - full-featured personal photo management application for the GNOME desktop
* Google Picasa - application for organizing and editing digital photos
Internet:
* Firefox
* Opera
* Flash Player 9
* gFTP - multithreaded FTP client
* Thunderbird - email and news client
* Evolution - combines e-mail, calendar, address book, and task list management functions
* aMule - P2P file sharing application
* Bittorrent client
* Azureus - Java Bittorrent client
* Gaim - multi-platform instant messaging client
* Skype
* Google Earth
* Xchat IRC - IRC client
Office:
* OpenOffice Writer - replacement for Microsoft Word
* OpenOffice Calc - replacement for Microsoft Excel
* Adobe Reader
* GnuCash - double-entry book-keeping personal finance system, similar to Quicken
* Scribus - open source desktop publishing (DTP) application
Sound & Video:
* Amarok - audio player
* Audacity - free, open source, cross platform digital audio editor
* Banshee - audio player, can encode/decode various formats and synchronize music with Apple iPods
* MPlayer - media player (video/audio), supports WMA
* Rhythmbox Music Player - audio player, similar to Apple’s iTunes, with support for iPods
* gtkPod - software similar to Apple’s iTunes, supports iPod, iPod nano, iPod shuffle, iPod photo, and iPod mini
* XMMS - audio player similar to Winamp
* dvd::rip - full featured DVD copy program
* Kino - free digital video editor
* Sound Juicer CD Extractor - CD ripping tool, supports various audio codecs
* VLC Media Player - media player (video/audio)
* Real Player
* Totem - media player (video/audio)
* Xine - media player, supports various formats; can play DVDs
* GnomeBaker - CD/DVD burning program
* K3B - CD/DVD burning program
* Multimedia-Codecs
Programming:
* Nvu - WYSIWYG HTML editor, similar to Macromedia Dreamweaver, but not as feature-rich (yet)
* Bluefish - text editor, suitable for many programming and markup languages
* Quanta Plus - web development environment, including a WYSIWYG editor
Other:
* VMware Server - lets you run your old Windows desktop as a virtual machine under your Linux desktop, so you don’t have to entirely abandon Windows
* TrueType fonts
* Java
* Read/Write support for NTFS partitions
Ubuntu automatically installs the GNOME desktop.
Lots of our desired applications are available in the Ubuntu repositories, and some of these applications have been contributed by the Ubuntu community. The rest (except for Nvu) can be obtained by using Automatix.
I will use the username falko in this tutorial. Please replace it with your own username.
via http://www.howtoforge.com/the_perfect_desktop_ubuntu7.04
Popularity: 49% [?]
Tags:
amule,
cat,
decode,
flash,
font,
gnome,
install,
linux,
ls,
mplayer,
multimedia,
p2p,
ubuntu,
vi
Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

经过一番折腾,解决了 pclinuxos 中文输入和显示的问题。官方源速度很慢,先换成 pclosusers.com 的,打开终端
cd/etc/apt/
su root
vim sources.list
把默认第一个源改为
rpm http://pclosusers.com/pclosusers/pclosfiles pclinuxos/2007 main extra nonfree kde
在 Package Manager(Synaptic) 中搜索并安装 wqy( Wen Quan Yi bitmap font)以及 scim-bridge,de-il8n-zh_CN-GB2312,fonts-ttf-chinese,中文输入法fcitx(scim似乎与某个软件冲突,默认情况下不能用)(郭爽注:但我还是选择了 scim-bridge,我受不了 fcitx 的选字和翻页方式,很不习惯)可选包manpage,mozilla-firefox-zh_CN 等。

在 Control Center 加入中文。

在 Control Center - system 加入输入法,选择 scim+pinyin,备份并修改 i18n
su root
cp /etc/sysconfig/i18n /etc/sysconfig/i18n.bak
vim /etc/sysconfig/i18n
内容如下
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim
GTK_IM_MODULE=scim
QT_IM_MODULE=scim
XIM_PROGRAM=”scim -d”
XMODIFIERS=@im=SCIM
注销(logout)重新登录即可。
此时firefox 网页中文可正常显示,但标题栏中文显示方块。还是在 Control Center - Appearance & Themes - Fonts 中选择字体为 wqy 即可(尤其是 window title 字体和taskbar 字体等)。注意:其它的应用程序如果出现中文方块,需要单独设置该程序的字体,比如 Konqueror 默认不能显示中文,在其字体设置中 sans serif 改为 wqy 宋体即可。
相关日志:
hp 3239(3240)安装pclinuxos笔记
pclinuxos 测试
英文locale下的scim输入法中文配置
Popularity: 14% [?]
Tags:
cat,
font,
hp,
linux,
vi,
wqy
ad 468x60