让星际译王发声

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

星际译王的安装请参考旧文:
dapper 安装星际译王(stardict)

让星际译王发声需要下载 WyabdcRealPeopleTTS-1.0-1.noarch.rpm

sudo alien -i WyabdcRealPeopleTTS-1.0-1.noarch.rpm

安装即可。

如果源里有的话:
sudo apt-get install wyabdcrealpeopletts

ftp.ubuntu.org.cn 密码
http://forum.ubuntu.org.cn/viewtopic.php?t=9685

Popularity: 11% [?]

Tags:

linux 命令行英->中翻译

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

如果没有 w3m(文本浏览器) 的话,先安装

sudo apt-get install w3m

然后建立自己的脚本

sudo gedit /usr/local/bin/dict

内容如下:

#!/bin/bash
w3m http://www.ipark.cn/page/dic.asp?w=$1

保存退出。修改 dict 权限

sudo chmod 755 /usr/local/bin/dict

以后执行
dict fire 就可以查询 fire 的中文翻译。

此方法参考 Multilingual dictionary via command line in Ubuntu 得出。注意:因为ipark.cn是gb2312而不是utf-8所以不能中译英(因为乱码),请自行改为支持 utf-8的翻译站点。

google translate url

http://translate.google.com/translate_t?text=fire&hl=en&langpair=en|zh-CN&tbb=1&ie=UTF-8
http://translate.google.com/translate_t?text=%E8%AF%B4&hl=en&langpair=zh|en&tbb=1&ie=UTF-8

Popularity: 13% [?]

Tags: , , , ,

pyromania 的 linux 软件清单

Posted 9 months, 2 weeks ago at 11:32 am. 0 comments

内容很多,至少我看到文章已经排到第26篇了,你可以在 http://hi.baidu.com/pyromania/blog/category/Linux/index/
或者
百度搜索 我的Linux软件清单 site:hi.baidu.com/pyromania 找。

我感兴趣的部分内容如下:

我的Linux软件清单<二十六>–其他篇
2007-04-22 20:26

pimlico:个人信息管理套件

scrot: 抓屏

LinuxMCE: Linux多媒体娱乐中心

Hybird share: Windows Linux Macox 下share 文件

gISOMount :ISO文件挂载

Acetone ISO: Linux 虚拟光驱Daemon。

理财:

Gnucash

Kmymoney

Money manager EX

gnofin

Grisbi

nomebank

Ipod管理程序:

gtkpod

Hipo

gpodder

SIVE

Yamipod

Flooa

终端sync:

MultiSync

MultiSynK

SynCE-KDE

Raki : KDE下的sync软件

思维导图:

Kdissent

semantik

psycho

view your mind

Freemind

我的Linux软件清单<二十二>–工具篇
2007-04-22 20:16

中文输入:

Fcitx

Scim-pinyin

Skim

字典:

stardict(屏幕取词,词库大,英汉,汉英, 英英)

ibmdict(包含科技词典,词库大,英汉,汉英)

dictd:英汉 汉英 可以使用stardict的全部词库.

cdict:英汉 汉英 使用安装方便,彩色显示.

Wisedict: 不依赖Gnome存在得星际

JaLingo

Mp3tag

easytag

mp3info

Kid3

桌面搜索

Beagle

searchmonkey

Recoll

Kerry Beagle

Pinot

Strigi

Tracker

Docco

Kat

splunk

doodle

affinty

CD烧录:

NeroLinux

K3b

Brasero

GnomeBaker

cdrecord

笔记本:

basket

gjots

tomboy

zim:wiki + 笔记

notecase

xournal

xpad

Knowit

Notebook

TuxCards

网络:

ethreal

tcpdump

snort

桌面blog撰写:

Drivel

Bleezer

LogJam

Gnome-blog

Hobix

文件比较:

KDiff3

Vimdiff

meld

其它:

gnuplot 科学绘图

metapost

Asymptote

科学计算: matlab, octave

我的Linux软件清单<二十>–Video篇
2007-04-22 20:04

vedio player:

Mplayer(Kmplayer SMplayer)

Totem

realplayer

Gxine

Xine

VLC

Kaffeine

Freevo

Kplayer

Elisa Media Center

Myth TV

我的Linux软件清单<十九>–Audio篇
2007-04-22 20:02

Audio media player:

Audacious

Beep Media Player Versatile audio player that supports Winamp skins

BMPX

Xmms Versatile X audio player

Rhthmbox music player and organizer for GNOME

Amarok versatile and easy to use audio player for KDE

MPD

Sonata

Gimmix

ncmpc

muine

Banshee Audio Management and Playback application

exaile flexible audio player, similar to Amarok, but written in GTK+

Quod Libet audio library manager and player for GTK+

Xfmedia

songbird desktop Web player

listen A nice music player and manager for GNOME

Lsongs all-in-one media player

MadMan

Juk

Noatun

Quark music player daemon controlled from the gnome panel or cli

mpg123

splayer

mpblaster

dissent

moc

Mesk : 简洁而朴实得音乐播放器 A PyGtk+ audio player

Helix Player the helix audio and video player

somaplayer player audio for the soma suite

Aqualung Music Player Gapless Gtk-based audio player

Gmusic browser

我的Linux软件清单<十二>–Ftp篇
2007-04-22 19:33

Ftp client:

GFtp

lftp:

Virgoftp

KBear

ncftp

proftp

crossftp

MC:文件管理器,同时也是一个Ftp Client

Kftpgrabber

Iglooftp

我的Linux软件清单<七>–下载篇
2007-04-22 19:21

Download:

D4X(Download For X)

Prozilla

Filezilla

Kget

Multiget

Sun Download Manager

Aria

doKa

命令行:

Curl

Proz

Axel

我的Linux软件清单<九>–rss阅读器篇
2007-04-22 19:27

Feed Reader:

Blam an RSS aggregator for GNOME

Alligator

liferea feed aggregator for GNOME

Rssowl Reader for RSS, RDF, and Atom Newsfeeds

blogbirdge wrangle RSS feeds from blogs and news into one pretty cool organizer

Akregator(KDE) RSS feed aggregator for KDE

Straw desktop news aggregator for GNOME

我的Linux软件清单<四>–IM篇
2007-04-15 13:31

IM篇:

Gaim/Pidgin Gnome下的一款支持多种协议得IM软件,最近听说好像要改名字了。支持MSN、yahoo、AOL、QQ(openq插件)、Gtalk(Jabber协议)等功能,也是我最常用得IM软件。

Kopete KDE下得默认IM软件,和Gaim一样。其也支持大多数协议。好像Linux中文社区里也开发了一个针对Kopete的qq插件。

skype:Free Internet Telephony - The whole world can talk for free

Ekiga:H.323 and SIP compatible VOIP client

Gabber: Gnome下的Jabber IM

Gajim: 专著于Jabber协议得IM

Gimo Project: A free phone for your computer

LumaQQ: 使用Java编写得跨平台QQ客户端软件,支持qq群等功能。

EVA:KDE下得一款QQ客户端软件,软件得名字好像来自于开发者女友得名字:)。

openQ,Gaim得一个插件,提供QQ协议支持。

PSI: Jabber client using Qt

Cyclone:

AMsn:一个linux下的MSN客户端。

Mercury: Mercury 是使用 Java 语言写成的 MSN 聊天程序。换句话说,你可以使用 Mercury 来代替 MSN Messenger 完成同样的事情。

Jabbin Jabber IM client with VoIP support

wengophone SIP-based software telephone with video and chat features

Tapioca

ScatterChat : Secure instant messaging client
Gossip friendly Jabber client for GNOME

KMess Instant messenger to use MSN on KDE

Popularity: 23% [?]

Tags: , , , , , , , , , ,

ubuntu 常见问题

Posted 9 months, 2 weeks ago at 11:31 am. 0 comments

Q: 为什么我的/分区或者/var分区越来越大?能删除么?apt-get或新立得下载的软件包都在哪里?
A: 当然可以,/var/cache/apt/archieve 下的都是软件的安装缓存,你可以直接删除,或者用命令sudo apt-get autoclean(只删除低版本的deb包),sudo apt-get clean(全部删除)。为了以后重装系统方便,可以将这些deb包保存到其他地方。

Q: 为什么无法安装?我一见到”loading kernel”就停住了,死活过不去?
A: 你可以在安装时按F6,然后在启动选项后面添上 acpi=off,也可以尝试noapic。具体请搜索论坛。

Q: stardict为什么没有字典?如何安装?
A: 请到stardict主页下载字典,解压后放到/usr/share/stardict/dic。也可直接下载源里的(只是数量有限)。注意,stardict-treedict- infoBrowse-zh_CN-2.4.2 应该放到/usr/share/stardict/treedict 而非treedic,请自行把该目录更名。

Q: 一般软件安装在什么目录?
A: 一般的deb包(包括新立得或者apt-get下载的)都装在/usr/share。自己下载的压缩包或者编译的包,有些可以选择安装目录,一般放在/usr/local/,也有在/opt的。如果想知道具体位置,用命令

dpkg -L xxxx.deb

注意,xxxx是deb包的名称,也可以用新立得来查看。另参见apt使用参考。

Q: 为什么ubuntu要用那么多内存阿?
A: 千万别以windows的思路思考问题。这是linux,内存管理机制要比win优秀的多得多,尽量使用内存而不是虚拟内存(swap区)。

Q: 为什么我用ctrl+alt+Fn进入控制台时花屏/zhcon在控制台下花屏?
A: 你需要开启内核的frame buffer
代码:
sudo nano /boot/grub/menu.lst
找到kernel一行(是你一直使用的内核,非single那个),在末尾添上vga=数值,数值请看下表(为方便已经把数值换算成十进制):
* 色彩 640×400 640×480 800×600 1024×768 1280×1024 1600×1200
* 4bits ?———-?———–770——–?———–?———–?
* 8bits 768——-769——–771——–773——–775——–796
* 15bits ?———784——–787——–790——–793——–797
* 16bits ?———785——–788——–791——–794——–798
* 24bits ?———786——–789——–792——–795——–799
例如,1024*768@16bits就是添上 vga=791
注意:vga不支持宽屏,只能找相近的值,而且屏幕会被拉扁。

Q: 什么是super键?如何设置?
A: super键就是你的win键,一般在ctrl和alt之间。找到 系统-首选项-键盘-布局选项-Alt/Win键行为,将“super键被映射到windows键”钩上。

*Q: 为什么我的gmplayer打开时会出现
引用:

opening/initializing the selected video-out(-vo)device.

A: 说明你没有选择正确的视频输出驱动。右键单击mplayer窗口,找到Preferences-Video-Available drivers,选择一个合适的即可。

Q: 有多线程下载工具吗?
A: d4x、firefox的downthemall插件,另外推荐multiget,速度最快。

*Q: 我的添加删除按钮怎么消失了?
A: 右键单击“应用程序”,找到编辑菜单,然后看添加删除有没有钩上。也有可能你把这个软件包给删除了,请执行
代码:
sudo apt-get install gnome-app-install

Q: 如何查看我的系统版本?
A:
代码:
lsb_release -a

Q: 如何清理无用的包?
A:
代码:
sudo apt-get autoremove
sudo apt-get install gtkorphan

找到 系统->系统管理->Remove orphaned packages,然后清理不需要的包(注意别误删)。

Q: 为什么我的audacious无法播放ape音频?
A:
代码:
sudo apt-get install audacious-mac

Q: 为什么我的mplayer播放时无法全屏?
A:
代码:
nano ~/.mplayer/config
在开始的地方添上
代码:
zoom=yes
保存。
或者
代码:
sudo nano /etc/mplayer/mplayer.conf
找到zoom=yes那行,把前面的注释#去掉,保存。

Q: 为什么我的mplayer无法拖动进度条?
A: 要么自己编译mplayer,但不推荐。要么就用快捷键,比进度条方便而且精确,这些键包括上下左右和翻页键,也可以自己修改这些键的跳跃程度(时间)。可以把/etc/mplayer/input.conf这个文件cp到~/.mplayer,然后修改所需要的部分。

4.查看pdf时中文出现乱码?
a) evince,xpdf
sudo apt-get install xpdf-chinese-simplified
b) acroread
http://www.adobe.com/products/acrobat/acrrasianfontpack.html

5.如何重启X?
a) Ctrl+Alt+BackSpace
b) sudo /etc/init.d/gdm force-reload
sudo /etc/init.d/kdm force-reload

完整内容在 http://forum.ubuntu.org.cn/viewtopic.php?t=35100&highlight=%E4%BC%91%E7%9C%A0

Popularity: 17% [?]

Tags: , , , , , , , , , ,

dapper 安装星际译王(stardict)

Posted 9 months, 2 weeks ago at 11:31 am. 0 comments

cn99.com 的 dapper 源里没有星际译王的词典包。在新利得安装 stardict 以后,不能翻译任何东西。

在这里可以下载星际译王的词典包:

http://ftp.ubuntu.org.cn/dictionary/
http://stardict.sourceforge.net/Dictionaries_zh_CN.php

星际译王将在 “/usr/share/stardict/dic” 和 “~/.stardict/dic” 目录查找词典文件,在 “/usr/share/stardict/treedict” 和 “~/.stardict/treedict” 目录查找树型词典文件。

下载后解压,拷贝文件到 “/usr/share/stardict/dic” 或者 “~/.stardict/dic” 目录,重启 stardict,即可

这是 ubuntu.org.cn 默认推荐的词典包

stardict-cdict-gb stardict-cedict-gb stardict-hanzim stardict-langdao-ce-gb stardict-langdao-ec-gb stardict-oxford-gb stardict-xdict-ce-gb stardict-xdict-ec-gb

BTW:郁闷的是,装了下面这些常用词典之后,仍然不能翻译 firefox,:(

cdict-gb.dict.dz
cedict-gb.dict.dz
computer-ru.dict.dz
langdao-ce-gb.dict.dz
langdao-ec-gb.dict.dz
oxford-gb.dict.dz

Popularity: 7% [?]

Tags: , ,

Ubuntu的世界

Posted 9 months, 2 weeks ago at 11:31 am. 0 comments

原文来自 ubuntu中文

last modified 2005-11-15 11:12
Contributors: 英文来源: http://beta.news.com.com/Ubuntu+carves+niche+in+Linux+landscape/2100-7344_3-5886194.html?tag=nefd.top, 中文翻译: https://d4e.org/showthread.php?t=64721

(CNET09/30美西电)一般而言,新发行一款Linux操作系统,而且还能有广大的追随者,并不是件容易的事。但Ubuntu的开发者却做到了。

据粗略的统计,目前 Linux 的发行版本至少有 386 种之多,这个数据反应出有大量的开发小组都志在推出自己的 Linux 发行版,他们为这个开源的操作系统,添加了各式各样的开源软件,都在竭力将其妆点为功能齐全的操作系统。但在 Linux 世界里,除了大 名鼎鼎的 Red Hat , Suse 和 Debian ,其它大多数都名不见经传,因此想要一举成名,绝对不是件容易的事。

Ubuntu 起源于2年前,它是由 Mark Shuttleworth 一手推动的。谁是 Mark Shuttleworth ? 10年前他成立了(电脑及网络)安全咨询公司 Thawte Consulting ,后来以5.75亿美元卖给了 VeriSign,不过使他名噪一时的还是,他(自费)乘坐俄国飞船,在国际空间站中度过了8天的时光。

Ubuntu 算是 Debian 的副产品。其出发点是为了让个人电脑变得简单易用,但它也有一个服务器版本。开发者大多是自愿者,也有来自 Shuttleworth 那间只要50个员工的创业公司 Canonical ,以及同样是他出资赞助的 Ubuntu Foundation(Ubuntu基金会)( Shuttleworth 赞助了1千万美元)。他对产品开发有很强的影响力,开发人员都称他 SABDFL (self-appointed benevolent dictator for life 的简称,意思是自封的仁慈大君)

Ubuntu 只出过两个版本,代号为 ‘Breezy Badger’ 的第3个版本预计将于10月13日推出。软件还沒上市,但已赢得不少赞誉。 RedMonk 公司的分析师 Stephen O’Grady 这样评价:“这款软件,我极力向 Linux 新手推荐,不为别的,只为它里面所有的一切都能顺利地运作。” 他还说, Ubuntu 的开发社区非常有实力。

Breezy Badger 将包括对 Linux Terminals Server Project (Linux终端服务器)的支持。这个终端服务器项目深受教育界人士的喜爱,因为低性能的个人电脑,也能通过终端连接方式,分享 Linux 服务器的强大功能和丰富资源。Ubuntu 第3版还推出了一个 ‘configurator(软件配置工具)’,电脑商可以利用它,轻易实现软件的定制及安装新的插件。

Jeff Waugh 是最早加入 Canonical 公司的第3号人物,同时也是 Ubuntu 业务及社区开发负责人。他透露, Shuttleworth 的理想就是 Linux 要保持创新的活力。 Linux 目前只对高端付费的产品给予支持,而免费产品则没有这个待遇, Shuttleworth 也衷心希望这个情况能有所改观。

Waugh 说:“使用 Red Hat 的服务器版本,你必须得付费才行。但 Ubuntu 没有这种玻璃天花板的限制,你可以随意使用任何 Ubuntu 的企业版软件。”

从 Linux 社区中脱颖而出

Linux 商业团体与犹如星星之火的‘开源社区’拉开了艰辛的对抗历程,而 Ubuntu 正是在这种背景下的崛起的。 Ubuntu 阵营的开发者有新兵也有老手,他们来自四面八方,有大企业、学校还有需要吸纳投资的创业公司,这支队伍更扩展到世界各地。通过对开发能力的历练,他们在开发新功能、查找问题、构筑用户基建平台以及制订开发项目的先后次序等方面都能得心应手。

Red Hat 有自己的社区开发项目, Fedora 。据 Red Hat 的首席执行长 Matthew Szulik 透露,前一段时间, Fedora 遇到一些麻烦,但现在社区与公司的关系得到缓解。 Novell 也有个类似的项目叫 OpenSuse ,而公司发言人 Kevan Barney 称 OpenSuse 的社区远比 Ubuntu 来得广泛。Sun 也如法炮制,为它的 Unix 产品设立了一个开源项目, OpenSolaris 。 Sun 认为开源社区这种方式,最终能让公司获益非浅。

但真正得益于 Ubuntu 成功的是 Debian 这个非商业化的 Linux 开源项目。Ubuntu 是以 Debian 的一个开发版本,Sid,为基础而发展起来的。 Waugh 透露,Ubuntu 的程序员们在 GNOME 桌面系统上整合得相当不错,而且也获得了 X .org 对低层图形系统的支持。

定量分析 Ubuntu 的具体收益是很困难的。 Ubuntu 是免费的,甚至也为用户提供免费的安装光盘(不用出邮费),因此它在 IDC (注1)的收益图表上,没有任何数据可查。但它的成功却是有迹可循的。值得一提的是,任何对 Ubuntu 所作的变动必须经过审批才行,有60个核心人物有这个特批权;而对 Ubuntu 的修改作出贡献的更是不计其数。代号 Warty Warthog 的第1版 Ubuntu,其发行拷贝超过了1百40万个。根据专门统计 Linux 发行版数量的 DistroWatch 网站透露,对 Ubuntu 感兴趣的用户人数名列众家 Linux 发行版之冠。

Ubuntu 有一个问题,就是缺少商业伙伴,但这个情况现在也有所改观。 VMWare 专门从事虚拟机的研制,即能在同一台机器上同时运行多个操作系统,在其最新的 VNWare 5 测试版中,根据用户要求,就尝试着对 Ubuntu 进行了支持。据 HP 女发言人 Nita Miller 透露,HP 有一款面向欧洲及非洲市场销售的笔记本电脑,安装的就是 Ubuntu 操作系统,而且公司也计划为其它地区销售的桌面电脑提供 Ubuntu 操作系统。

如果在其未来版本中能提供更稳定的性能,那么获得商业支持应该是容易的。Ubuntu 每6个月发布一个新版本,其下一个版本是6.04,代号为 Dapper Drake,预计将于2006年4月推出。该版本的桌面系统享有3年的技术支持,而服务器版则有5年的保障。和目前18个月的技术支持相比,这个新的服务周期真的可谓是相当长的了。

这个举动拉近了 Ubuntu 和几大主要商业 Linux 产品之间的距离。举例来说,Red Hat 及 Suse 的企业版 Linux 的主要升级周期是一年半,这样作的好处就是,用户及商业伙伴不用疲于奔命地不断升级。和商业软件相比,Ubuntu 还有一个短处,那就是:对服务器硬件及专用软件,缺乏用户认证。商业 Linux 对 Oracle、SAP、 IBM 及 Dell 等软硬件公司都颁布相应的产品认证。

发展的阻力

尽管 Ubuntu 的成功,帮助 Debian 提高了声誉,但 Ubuntu 并没有获得相应的回报。

最大的一个障碍来自 Denian 的创始人 lan Murdock,他也是创业公司 Progeny 的首席战略主管(chief strategy officer )。Progeny 致力于 Debian 商业化,也是 DCCA(Debian Common Core Alliance,Debian公共核心联盟)的发起成员,其核心目的就是解决基于 Debian 的 Linux 发行版之间的兼容问题。但 Ubuntu 却不是 DCCA 成员。

Murdock 称:“我即赞成也反对 Ubuntu。”赞成的原因是: “Ubuntu 是非常优秀的 Linux 发行版。毫无疑问,Ubuntu 的成功也促使了 Debian 的全球化。” 反对的理由则是:“Ubuntu 选择了脱离 Debian 的做法,而不是在 Debian基 础上加以改进。这不可避免的会出现与 Debian 不兼容的问题。”

Waugh 对 DCCA 沒什么好印象。他说:“过往有很多失败的地方,但这个联盟并没有显示出有什么与众不同的地方。我们认为它沒什么用。”

然后,Murdock 又表示他希望 Ubuntu 能对 Debian 起到更直接的帮助作用。他认为:“Ubuntu 在偏离 Debian 的方向上花很大的力气,如果能把这部分精力放到改良 Debian 上就好了。否则的话,Ubuntu 的成果真得很难为 Debian 所用。”

但 Waugh 认为,Debian 的出发点有问题,它太过于博大了,蕴含了太多的第3方工具集。他补充说:“Debian 由来已久,有自己的文化、社区乃至基本框架。面对这么复杂的项目,你不可能单刀直入地说‘这是我们要作的。。。’”

O’Grady 认为 Ubuntu 的风头盖过了 Debian,因此对 Ubuntu 和 Debian 之间的摩擦并不感到惊奇。他指出:“Ubuntu 名声鹊起,光芒掩过了 Debian。”

开发者眼中的 Ubuntu

当问及参与 Ubuntu 的动机是什么时,开发人员迅速提及追求自由是加入开源阵营的目的。

Ubuntu 首席技术总监(Chief Technology Officer,简称CTO)Matt Zimmerman 如是说:“随着我对开源运动的不断投入,参与到 Ubuntu 中来是件非常自然的事。我此前有5年的光景是 Debian 的开发者。 Ubuntu 给人一种机会,能从多个方面打造一个开源的操作系统。”

Waugh 补充说:“很多人开始使用 Ubuntu 是因为它免费,就像能免费品尝啤酒那样(趋之若鹜),然而他们会突然意识到,它能运行的如此流畅恰恰是因为它很自由,就如同你享有言论自由(free speech)那样自然(注2)。”

当然问题总是存在的。 Zimmerman 认为:“Ubuntu 最不利的恐怕就是,这个项目的历史并不长,却已经处在 Linux 的前沿地带,如何确保前进的方向,对我们是个挑战。Ubuntu周 遭有无数社区和团体,他们意气风发,醉心于尝试不同的新鲜事物,而现实是每一次的前进 ,我们只能选择有限的方面作为尝试的目标。”

Sam Pohlenz 负责 Ubuntu 图形配置工具的开发。由于开源软件对许可证使用的严格规定,Ubuntu 的音频视频模块所获得支持很有限。Pohlenz 对此非常恼火。

他说:“所有 Linux 发行版都受到现有多媒体解决方案的限制。”这些工具包可以后期安装,但‘法律问题极大地阻碍了像 Ubuntu 这样的 Linux 发行软件的发展。’

Jonathan Riddell 认为 KDE 桌面系统是缺省安装的 GNOME 桌面系统的一个不错的替代方案,因此他投入到 KDE 的开发中。KDE 是 Ubuntu 的分支开发产品,属于另一个称作 Kubuntu 的项目。

Riddle 认为:“Ubuntu 上没有良好的 KDE 支持。Ubuntu 很显然是一个相当重要的 Linux 发行版,因此我觉得给 Ubuntu 加上 KDE 支持也是必不可少的。”

起码到目前为止,在这个开源项目中,理想仍然是强大的前进动力。项目成立伊始,大家寻求为产品命名。Shuttleworth 建议就叫它 Ubuntu。

Waugh 回忆说:“他(Shuttleworth)说 Ubuntu 是一个源自非洲的词,意思是‘I am because we are(没有群体就没有个体,注3)’。它强调的是集体(社区)的重要性。彰显的是分享精神与整体意识。当时屋中参加讨论的人都啧啧称奇,纷纷表示首肯,这个词所体现的也正是我们对自由软件和开源运动价值观的认同。”

注:

1. IDC, 全球著名IT及电信行业市场咨询和顾问机构

2. 西方谚语,“Free speech is a free gift ”。而且免费软件,常常用 Free as in free speech 和 Free as in beer,这两个说法来表示,象征着物质和精神方面的自由。 Free 是免费,也是自由的表示。这里 Waugh 用的是双关。

3. 国内很多地方又译作: 乐于分享

Popularity: 10% [?]

Tags: , , , , , , ,

ubuntu ing…

Posted 9 months, 2 weeks ago at 11:30 am. 0 comments

i love this guy,so greate!but ADSL is too poor to apt-get this softwares…
ubuntu ing at home …

worklist

1.sudo-pppoeconf -> adsl
2.firefox +tab mix plus +compact menu
3.sudo gedit /etc/apt/sources.list

use these sources below

deb http://archive.ubuntu.org.cn/ubuntu/ breezy main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu/ breezy-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu/ breezy-updates main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu/ breezy-backports main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn/ breezy main restricted universe multiverse
deb http://archive.ubuntu.org.cn/backports/ breezy-extras main restricted universe multiverse

sudo apt-get update
sudo apt-get dist-upgrade

4. fonts -> yuanti

download this font package
http://download.ubuntu.org.cn/software/VeraSansYuanTi.tar.gz

sudo mv VeraSansYuanTi /usr/share/fonts/
sudo fc-cache -f
sudo cp /etc/fonts/fonts.conf /etc/fonts/fonts.conf.old
sudo cp /usr/share/fonts/VeraSansYuanTi/fonts.conf /etc/fonts/

restart X windows.(ctrl+alt+backspace)

5.chinese Mime- SCIM

sudo apt-get install scim scim-modules-socket scim-modules-table scim-pinyin scim-tables-zh scim-input-pad
sudo sh -c ” echo ‘export XMODIFIERS=@im=SCIM ; export GTK_IM_MODULE=”scim” ; scim -d ‘ > /etc/X11/Xsession.d/95xinput ”
sudo chmod +755 /etc/X11/Xsession.d/95xinput

all these packages need 71+82M,:( shit.it is nightmare to my poor ADSL,out eat first…

6.多媒体播放器以及解码器
sudo apt-get install beep-media-player totem-xine w32codecs gstreamer0.8-plugins

mp3 是不是 有版权啊?干嘛linux默认都不支持 mp3 什么的…

7.nividia driver
echo 安装nvidia驱动

sudo apt-get install nvidia-glx
sudo apt-get install nvidia-settings
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo nvidia-glx-config enable

8.echo 去除ntpdate同步服务.ubuntu 启动同步时间报错(没上网状态 )或者慢
sudo chmod -x /etc/init.d/ntpdate

9.mount
mount /dev/hda5 /windows/hda5 -t vfat -o utf8,umask=000

10.gaim + msn +gtalk

协议:Jabber
用户名:gmail邮箱前缀
服务器:gmail.com
资源:google talk
密码:gmail邮箱密码

显示主要选项:
Jabber选项
选中 若可用则使用tls 和 允许在不加密流上的纯文本验证
端口:5222
连接服务器:64.233.167.125

todo list:

Nvidia drivers
opera
mp3+mpeg decode
chinese MIME
dictionary
ftp client - is there filezilla linux client?
win 硬盘卷标中文乱码

Popularity: 13% [?]

Tags: , , , , , , , ,

linux 命令行技巧

Posted 9 months, 2 weeks ago at 11:30 am. 0 comments

apropos word Show commands pertinent to word. See also threadsafe
apropos 查找相关的命令和系统调用

which command Show full path name of command
显示命令的完整路径,如

qing@qing:~$ which firefox
/usr/bin/firefox
qing@qing:~$ which opera
/usr/bin/opera

time command See how long a command takes
显示某命令执行了多长时间

nice info Run a low priority command (info in this case)

renice 19 -p $$ Make shell (script) low priority. Use for non interactive tasks

look prefix Quickly search (sorted) dictionary

grep –color expr…ion /usr/share/dict/words Highlight occurances of regular expression in dictionary

gpg -c file Encrypt file
gpg file.gpg Decrypt file

加密|解密文件

alias hd=’od -Ax -tx1z -v’ Handy hexdump. (usage e.g.: ? hd /proc/self/cmdline | less)
alias realpath=’readlink -f’ Canonicalize path. (usage e.g.: ? realpath ~/../$USER)
set | grep $USER Search current environment
ls /usr/bin | pr -T9 -W$COLUMNS Print in 9 columns to width of terminal
touch -c -t 0304050607 file Set file timestamp (YYMMDDhhmm)
dir navigation

cd - Go to previous directory 回到刚才目录
cd Go to home directory 回到home
(cd dir && command) Go to dir, execute command and return to current dir pushd . Put current dir on stack so you can popd back to it CDs

gzip < /dev/cdrom > cdrom.iso.gz Save copy of data cdrom
备份光盘数据

mkisofs -V NAME -r dir | gzip > cdrom.iso.gz Create cdrom image from contents of dir
mount -o loop cdrom.iso /mnt/dir Mount the cdrom image at /mnt/dir (read only)
cdrecord -v dev=/dev/cdrom blank=fast Clear a CDRW
gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom - Burn cdrom image (use dev=ATAPI -scanbus to confirm dev)
cdparanoia -B Rip audio tracks from CD to wav files in current dir
cdrecord -v dev=/dev/cdrom -audio *.wav Make audio CD from all wavs in current dir (see also cdrdao)
oggenc –tracknum=’track’ track.cdda.wav -o ‘track.ogg’ Make ogg file from wav file
archives
tar c dir/ | bzip2 > dir.tar.bz2 Make archive of dir/
bzip2 -dc dir.tar.bz2 | tar x Extract archive (use gzip instead of bzip2 for tar.gz files)
tar c dir/ | gzip | gpg -c | ssh user@remote ‘dd of=dir.tar.gz.gpg’ Make encrypted archive of dir/ on remote machine
find dir/ -name ‘*.txt’ | tar c –files-from=- | bzip2 > dir_txt.tar.bz2 Make archive of subset of dir/ and below
find dir/ -name ‘*.txt’ | xargs cp -a –target-directory=dir_txt/ –parents Make copy of subset of dir/ and below
( tar c /dir/to/copy ) | ( cd /where/to/ && tar x -p ) Copy (with permissions) copy/ dir to /where/to/ dir
( cd /dir/to/copy && tar c . ) | ( cd /where/to/ && tar x -p ) Copy (with permissions) contents of copy/ dir to /where/to/
( tar c /dir/to/copy ) | ssh -C user@remote ‘cd /where/to/ && tar x -p’ Copy (with permissions) copy/ dir to remote:/where/to/ dir
dd bs=1M if=/dev/hda | gzip | ssh user@remote ‘dd of=hda.gz’ Backup harddisk to remote machine
rsync (Use the –dry-run option for testing)
rsync -P rsync://rsync.server.com/path/to/file file Only get diffs. Do multiple times for troublesome downloads
rsync –bwlimit=1000 fromfile tofile Locally copy with rate limit. It’s like nice for I/O
rsync -az -e ssh –delete ~/public_html/ remote.com:’~/public_html’ Mirror web site (using compression and encryption)
rsync -auz -e ssh remote:/dir/ . && rsync -auz -e ssh . remote:/dir/ Synchronize current directory with remote one
file searching
alias l=’ls -l –color=auto’ quick dir listing
ls -lrt List files by date. See also newest
find -name ‘*.[ch]‘ | xargs grep -E ‘expr’ Search ‘expr’ in this dir and below. See also findrepo
find -type f -print0 | xargs -r0 grep -F ’string’ Search all regular files for ’string’ in this dir and below
find -maxdepth 1 -type f | xargs grep -F ’string’ Search all regular files for ’string’ in this dir
find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done Process each item with multiple commands (in while loop)
find -type f ! -perm -444 Find files not readable by all (useful for web site)
find -type d ! -perm -111 Find dirs not accessible by all (useful for web site)
locate -r ‘file[^/]*\.txt’ Search cached index for names. This re is like glob *file*.txt
networking (Note ifconfig, route, mii-tool, nslookup commands are obsolete)
ip link show List interfaces
ethtool interface List interface status
ip link set dev eth0 name wan Rename eth0 to wan
ip addr add 1.2.3.4/24 brd + dev eth0 Add ip and mask(255.255.255.0)
ip link set dev interface up Bring interface up (or down)
ip route add default via 1.2.3.254 Set default gateway to 1.2.3.254
tc qdisc add dev lo root handle 1:0 netem delay 20msec Add 20ms latency to loopback device (for testing)
tc qdisc del dev lo root Remove latency added above
host pixelbeat.org Lookup ip address for name or vice versa
hostname -i Lookup local ip address (equivalent to host `hostname`)
netstat -tupl List internet services on a system
netstat -tup List active connections to/from system
wget (multi purpose download tool)
(cd cmdline && wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html) Store local browsable version of a page to the current dir
wget -c http://www.example.com/large.file Continue downloading a partially downloaded file
wget -r -nd -np -l1 -A ‘*.jpg’ http://www.example.com/ Download a set of files to the current directory
wget ftp://remote/file[1-9].iso/ FTP supports globbing directly
wget -q -O- http://www.pixelbeat.org/timeline.html | grep ‘a href’ | head Process output directly
echo ‘wget url’ | at 01:00 Download url at 1AM to current dir
wget –limit-rate=20k url Do a low priority download (limit to 20KB/s in this case)
wget -nv –spider –force-html -i bookmarks.html Check links in a file
wget –mirror http://www.example.com/ Efficiently update a local copy of a site (handy from cron)
windows (note samba is the package that provides all this windows specific networking support)
smbtree Find windows machines. See also findsmb
nmblookup -A 1.2.3.4 Find the windows (netbios) name associated with ip address
smbclient -L windows_box List shares on windows machine or samba server
mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share Mount a windows share
echo ‘message’ | smbclient -M windows_box Send popup to windows machine (off by default in XP sp2)
math
echo ‘(1 + sqrt(5))/2′ | bc -l Quick math
echo ‘obase=16; ibase=10; 123′ | bc Base conversion (decimal to hexadecimal)
echo $((0×2dec)) Base conversion (hex to dec) ((shell arithmetic expansion))
echo ‘pad=20; min=64; (100*10^6)/((pad+min)*8)’ | bc More complex (int) e.g. This shows max FastE packet rate
echo ‘pad=20; min=64; print (100E6)/((pad+min)*8)’ | python Python handles scientific notation
echo ‘pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)’ | gnuplot -persist Plot FastE packet rate vs packet size
text manipulation (note sed uses stdin and stdout, so if you want to edit files, append newfile)
sed ’s/string1/string2/g’ Replace string1 with string2
sed ’s/\(.*\)1/\12/g’ Modify anystring1 to anystring2
sed ‘/ *#/d; /^ *$/d’ Remove comments and blank lines
sed ‘:a; /\\$/N; s/\\\n//; ta’ Concatenate lines with trailing \
sed ’s/[ \t]*$//’ Remove trailing spaces from lines
sed ’s/\([\\`\\"$\\\\]\)/\\\1/g’ Escape shell metacharacters active within double quotes
sed -n ‘1000p;1000q’ Print 1000th line
sed -n ‘10,20p;20q’ Print lines 10 to 20
sed -n ’s/.*<[tT][iI][tT][lL][eE]>\(.*\)<\/[tT][iI][tT][lL][eE]>.*/\1/p;T;q’ Extract title from HTML web page
sort -t. -k1,1n -k2,2n -k3,3n -k4,4n Sort IPV4 ip addresses
echo ‘Test’ | tr ‘[:lower:]‘ ‘[:upper:]‘ Case conversion
tr -dc ‘[:print:]‘ < /dev/urandom Filter non printable characters
grep 'processor' /proc/cpuinfo | wc -l Count lines
set operations (Note LANG=C is for speed)
LANG=C sort file1 file2 | uniq Union of unsorted files
LANG=C sort file1 file2 | uniq -d Intersection of unsorted files
LANG=C sort file1 file1 file2 | uniq -u Difference of unsorted files
LANG=C sort file1 file2 | uniq -u Symmetric Difference of unsorted files
LANG=C comm file1 file2 | sed 's/^\t*//' Union of sorted files
LANG=C comm -12 file1 file2 Intersection of sorted files
LANG=C comm -13 file1 file2 Difference of sorted files
LANG=C comm -3 file1 file2 | sed 's/^\t*//' Symmetric Difference of sorted files
calendar
cal -3 Display a calendar
cal 9 1752 Display a calendar for a particular month year
date -d fri What date is it this friday. See also day
date --date='25 Dec' +%A What day does xmas fall on, this year
date --date '1970-01-01 UTC 1234567890 seconds' Convert number of seconds since the epoch to a date
TZ=':America/Los_Angeles' date What time is it on West coast of US (use tzselect to find TZ)
echo "mail -s 'get the train' P@draigBrady.com < /dev/null" | at 17:45 Email reminder
echo "DISPLAY=$DISPLAY xmessage cooker" | at "NOW + 30 minutes" Popup reminder
locales
printf "%'d\n" 1234 Print number with thousands grouping appropriate to locale
echo "I live in `locale territory`" Extract info from locale database
locale | cut -d= -f1 | xargs locale -kc | less List fields in locale database
LANG=en_IE.utf8 locale int_prefix Lookup locale info for specific country. See also ccodes
disk space (See also FSlint)
ls -lSr Show files, biggest last
du -s * | sort -k1,1rn | head Show top disk users in current dir. See also dutop
df -h Show free disk space
df -i Show free inodes
fdisk -l Show disks partitions sizes and types (run as root)
rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n List all packages by installed size (Bytes) on rpm distros
dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all packages by installed size (KBytes) on deb distros
dd bs=1 seek=2TB if=/dev/null of=ext3.test Create a large test file (taking no space). See also truncate
monitoring/debugging
strace -c ls >/dev/null Summarise/profile system calls made by command
strace -f -e open ls >/dev/null List system calls made by command
ltrace -f -e getenv ls >/dev/null List library calls made by command
lsof -p $$ List paths that process id has open
lsof ~ List processes that have specified path open
tcpdump not port 22 Show network traffic except ssh. See also tcpdump_not_me
ps -e -o pid,args –forest List processes in a hierarchy
ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed ‘/^ 0.0 /d’ List processes by % cpu usage
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS List processes by mem usage. See also ps_mem.py
ps -C firefox-bin -L -o pid,tid,pcpu,state List all threads for a particular process
ps -p 1,2 List info for particular process IDs
last reboot Show system reboot history.
free -m Show amount of (remaining) RAM (-m displays in MB)
watch -n1 ‘cat /proc/interrupts’ Watch changeable data continuously
System information (see also sysinfo)
hdparm -i /dev/hda Show info about disk hda
hdparm -tT /dev/hda Do a read speed test on disk hda
badblocks -s /dev/hda Test for unreadable blocks on disk hda
mount | column -t Show mounted filesystems on the system (and align output)
cat /proc/partitions Show all partitions registered on the system
grep MemTotal /proc/meminfo Show RAM total seen by the system
grep “model name” /proc/cpuinfo Show CPU(s) info
lspci -tv Show PCI info
lsusb -tv Show USB info
recode (Obsoletes iconv, dos2unix, unix2dos)
recode -l | less Show available conversions (aliases on each line)
recode windows-1252.. file_to_change.txt Windows “ansi” to local charset (auto does CRLF conversion)
recode utf-8/CRLF.. file_to_change.txt Windows utf8 to local charset
recode iso-8859-15..utf8 file_to_change.txt Latin9 (western europe) to utf8
recode ../b64 < file.txt > file.b64 Base64 encode
recode /qp.. < file.txt > file.qp Quoted printable decode
recode ..HTML < file.txt > file.html Text to HTML
recode -lf windows-1252 | grep euro Lookup table of characters
echo -n 0×80 | recode latin-9/x1..dump Show what a code represents in latin-9 charmap
echo -n 0×20AC | recode ucs-2/x2..latin-9/x Show latin-9 encoding
echo -n 0×20AC | recode ucs-2/x2..utf-8/x Show utf-8 encoding
interactive
mc Powerful filemanager that can browse rpm, tar, ftp, ssh, …
screen Virtual terminals with detach capability, …
links Web browser
gnuplot Interactive/scriptable graphing
octave Matlab like environment

via http://www.pixelbeat.org/cmdline.html

Popularity: 20% [?]

Tags: , , , , , , , , , , , ,

Hiweed Desktop 1.0 基于 ubuntu 的中文版本

Posted 9 months, 2 weeks ago at 11:30 am. 0 comments

我就是从 hiweed debian - “ 解除新手的痛苦 节省老手的时间”开始进入 linux 世界的。推荐新手们从 hiweed 开始吧。

1.0 是一个由 Xubuntu 的 LiveCD 定制而来的版本。Desktop 1.0 和以前的版本相比,有非常大的变化。
具体特性有:

* 采用 Xubuntu Dapper 软件包,安装了最新安全补丁
* 是一个 LiveCD,直接从光盘运行
* 可以安装到硬盘
o 安装速度很快,大约 10 分钟
o (在我的本本上测试多次,都是 7 分钟,光格式化 80G 的硬盘就用掉近 2 分钟)
* 启动、关闭过程图形化了
* 可以识别更多硬件(能够直接驱动 ipw3945 无线网卡)
* 有了自己的 Hiweed-Green 主题(这个世界太缺少绿色了)
* GDM 主题也有 Hiweed-Green 的了
* 有 Java 运行环境了
* 采用 XFCE 4.4beta1 桌面管理环境(轻量级啊)
o 超轻量级的 Thunar 文件管理器
o 超轻量级的 XArchiver 压缩解压软件
* OpenOffice.org 2.0 办公套件
* Sylpheed 轻量级电子邮件客户端
* XFMedia 及 Mplayer 媒体播放器
* 包括 W32Codecs 在内的大量媒体解码器,可以播放大部分媒体格式
o 在桌面上的 Samples 目录下,提供了不同格式的媒体文件,供您测试
o 其中,Bandari 的 The Sound of Silence 是我最喜爱的音乐,强烈推荐!
o 另有 2 首也是 Bandari 的音乐精品
o 其他文件都是随便找来的,只是为了让大家测试不同格式文件的播放
* Mplayer 的 Firefox 插件,可以在线播放网页内的媒体文件
* d4x 下载管理器
* gFTP 文件传输客户端
* LumaQQ 聊天工具
* Skype 聊天工具
* Gaim 聊天工具
* xChat 聊天工具
* aMule 下载工具
* Bittorrent 下载工具
* Stardict 电子辞典
o 21 世纪英汉汉英双向辞典
o 郎道英汉、汉英辞典 5.0
* xCHM 及 PDF 阅读器
* gnomeBaker 光盘刻录工具
* Gimp 图片创作工具

hiweed download

Popularity: 21% [?]

Tags: , , , , , , , , ,

linux 课堂笔记1(转)

Posted 9 months, 2 weeks ago at 11:30 am. 0 comments

原文来自linuxfans

单元三实验
文件和目录操作

估计用时:1小时30分
目标:熟悉文件、目录操作命令的数、语法和几个文件的使用。实验将这些命令组合成一个一般的用户任务。

实验前准备:准备一个安装好的Red Hat Linux 系统,并准备一个叫student 的非特权帐号,其密码为student。检查一下指南以确认这个帐号是否已经存在在系统中。如果你的student 帐号还未建立,则按如下次序操作:

1、以root 用户登录
2、输入 # useradd student
3、输入 # passwd student
Changing password for user student
New UNIX password: {在这里输入student}
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password {重新输入student}
passwd: all authentication tokens updated successfully

实验1:目录和文件管理
假设:
你在你的home 目录中收集了一大堆文件,而你觉得现在该是将他们整理一下的时候了。你打算建立几个新的子目录,并将拷贝或者移动它们以适合你的安排。除此之外,还有一些文件你根本用不着,你想删除它们。

任务:
1、在tty1 上以student登录。密码为student。

2、刚刚登录后你应该在你的home 目录中。用”print working directory”命令校验一下。
$ pwd
/home /student

3、用一下命令检查一下你在home 目录中有否文件:
$ ls
$ ls -a
$ ls -al
为什么第一个命令和第二个命令返回不同的文件个数?
从第三个命令的输出中你看出哪个文件在你当前的home 目录中最大?
在home 目录中有子目录吗?

4、你将使用touch 命令来建立一些这个实验所需要的文件。关于这个命令的具体问题将在今后的章节中讲述。现在,你只需简单的将下面的命令全盘打出(包括花括号{},还有几个下划线 _)。
$ touch {report,memo,graph}_{sep,oct,nov,dec}_{a,b,c}{1,2,3}

5、使用ls 命令检验上一个命令的效果。你应该发现在你的home 目录中有108个(哇……)新建立的空文件。这些文件便是你后面实验所需的数据文件。如果没有这些文件,后面的实验将无法继续。

6、为了管理你的文件你必须建立一些新子目录。使用mkdir 命令建立你的home目录的直接子目录:
$ mkdir “A Reports”
$ mkdir september october november december
再次使用ls 命令检验你的工作。

7、在你新建的子目录中再建立一些其他的目录,使用如下命令:
输入下面任一一行:
$ cd A\ Reports/
或者
$ cd “A Reports”/
改变了当前目录。然后:
$ mkdir 1 2 3
使用ls 命令校验你已经在”A Reports”目录中有了3个子目录,分别叫做1, 2, 3。

8、将所有含”B”的文件移出你的home 目录并以月份分组。做类似这种复杂的通配字符的操作时,通常先将其“预览”一遍会是个不错的主意,它可以让你确认是在正确的文件上进行了操作。其中一种方法是将你的命令替换成一种“无害”的命令。
$ cd
$ ls -l *dec?b?
你应该看到有9个”december”, “b”文件被列出。现在移动它们:
$ mv *dec?b? december/
列出december 子目录以确认移动操作顺利完成了。
$ ls -l december/
total 0
-rw-rw-r– 1 student student 0 Oct 16 22:16 graph_dec_b1
-rw-rw-r– 1 student student 0 Oct 16 22:16 graph_dec_b2
-rw-rw-r– 1 student student 0 Oct 16 22:16 graph_dec_b3
-rw-rw-r– 1 student student 0 Oct 16 22:16 memo_dec_b1
-rw-rw-r– 1 student student 0 Oct 16 22:16 memo_dec_b2
-rw-rw-r– 1 student student 0 Oct 16 22:16 memo_dec_b3
-rw-rw-r– 1 student student 0 Oct 16 22:16 report_dec_b1
-rw-rw-r– 1 student student 0 Oct 16 22:16 report_dec_b2
-rw-rw-r– 1 student student 0 Oct 16 22:16 report_dec_b3

9、将所有剩下的”B”文件分别移入相应的目录:
$ mv *nov?b? november
$ mv *oct?b? october
$ mv *sep?b? september

10、现在你将”A”文件移动到它们相应对数字的目录中去:
$ cd “A Reports”/
$ mv ~/*_a1 1/
“a1″,”september”文件不需要了。删除它们并确认剩下的文件已正确的移动了。
$ cd 1
$ rm *sep*
$ ls
graph_dec_a1 graph_oct_a1 memo_nov_a1 report_dec_a1 report_oct_a1
graph_nov_a1 memo_dec_a1 memo_oct_a1 report_nov_a1

11、将最后的”a2″和”a3″文件移入相应的数字目录中去:
$ pwd
/home/student/A Reports/1
使用相对路径移动”a2″文件:
$ mv ../../*a2* ../2/
使用绝对路径移动”a3″文件
$ mv /home/student/*a3* /home/student/A\ Reports/3/

12、回到你的home目录下,并用ls 确认在该目录下只剩下”c”文件。

13、每个月的”c1″和”c2″文件很重要,你想将它们备份到另外一个目录中去:
$ mkdir /tmp/archive
$ cp report*[1-2] /tmp/archive/
除此之外所有December月份的文件应备份到/tmp/archive 目录中。注意使用 -i 选项以使cp 命令在覆盖文件时提示。
$ cp -i report_dec* /tmp/archive/
cp: overwrite ‘/tmp/archive/report_dec_c1′? n
cp: overwrite ‘/tmp/archive/report_dec_c2′? n

14、现在你已经备份了一些对你来说重要的”C”文件,你想删除所有还留在你home 目录里的文件。用通配符*c*检验所剩余的文件。为什么你不能用rm *c*删除?
(提示:试试ls *c* 看看)

15、删除所剩余的”c”文件:
$ rm *c[1-3]
$ ls
A Reports december november october september

完成:
一个良好组织的home 目录,文件都放在合适的子目录中。一些文件备份在/tmp/archive 目录中。

实验2:检测磁盘使用程度

假设:
你想检测系统上每个文件系统所剩余的空间。除此之外,你需要有个包含最占磁盘空间的目录的列表。

任务:
1、使用df 检测文件系统上剩余的空间。输出将类似于如下所示(这当然取决于你的机器安装和配置)。
$ df
Filesystem 1k-blocks Used Available User% Mounted on
/dev/hda5 12880648 1634344 10591988 14% /
/dev/hda1 36566 2476 32202 8% /boot

2、注意缺省的df 命令是以块(block)为单位输出的。试着使用-h 和-H 选项产生更人性化的输出:
$ df -h
Filesystem 1k-blocks Used Available User% Mounted on
/dev/hda5 12G 1.6G 10G 14% /
/dev/hda1 36M 2.5M 31M 8% /boot

$ df -H
Filesystem 1k-blocks Used Available User% Mounted on
/dev/hda5 13G 1.7G 10G 14% /
/dev/hda1 37M 2.6M 32M 8% /boot
两种选项有何区别?(用man df 查找答案)

3、在home 目录下使用du (disk usage)命令检测你的home 目录使用了多少空间。务必使用-h 选项产生人性化输出。

实验3:检测文本文件

任务:

1、首先,我们需要一个文本文件:
$ cd
$ cp /usr/share/dict/words .

2、使用cat 命令显示文件
$ cat words
Aarhus
Aaron
Ababa
……输出省略……
Zulu
Zulus
Zurich

3、cat 在这种情况下是一个糟糕的选择,因为输出翻屏得很快。试着使用less:
$ less words
Aarhus
Aaron
Ababa
……输出省略……
abducts
Abe
abed
……输出省略……
用less 你可以往回翻(用b)和往前翻(用空格键),一次一个屏幕。

4、若你只需要快速浏览一下一个文件的头部或者尾部,你可以使用head 或者tail:
$ head words
Aarhus
Aaron
Ababa
aback
abaft
abandon
abandoned
abndoning
abandonment
abandons

$ tail words
zoologically
zoom
zooms
zoos
Zorn
Zoroaster
Zoroasterian
Zulu
Zulus
Zurich
使用man 搜索head 和tail,找到可以修改显示行数、和显示的相对位置的选项。

哪个命令可以显示某文件的前50行?
哪个命令可以显示某个文件从25000行开始,到其结束?

单元四实验:用户信息和man

估计用时:30分钟
目标:熟悉几个用户识别和帐户切换命令的使用。

实验前准备:准备一个安装好,完成过单元三实验的Red Hat Linux 系统,除此之外一个叫visitor 的非特权帐号,其密码为visitor。检查一下指南以确认这个帐号是否已经存在在系统中。如果你的visitor 帐号还未建立,则按如下次序操作:

1、以root 用户登录
2、输入 # useradd visitor
3、输入 # passwd visitor
Changing password for user visitor
New UNIX password: {在这里输入visitor}
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password {重新输入visitor}
passwd: all authentication tokens updated successfully

实验1:本地用户登录
任务:
1、完全注销你的登陆。务必确认你也退出了所有的虚拟终端和X Window 系统。

2、按切换到虚拟终端1(tty1)。

3、以root身份登录。

4、检测该登录。运行下列命令:
# whoami
# groups
# id
检测这些命令的输出。

5、检测当前工作站所有的登录。这时应该只有一个用户在该系统上登录。以下命令的输出将随着实验的进行变得越来越有趣。
# users
# who
# w
检测这些命令的输出。

6、按切换到虚拟终端2(tty2)。

7、使用student身份登录。

8、检测该登录的。运行下列命令:
$ whoami
$ groups
$ id
检测这些命令的输出。

9、检测当前工作站的所有登录:
$ users
$ who
$ w
检测这些命令的输出。

10、按切换到虚拟终端3(tty3)。

11、以visitor身份登录

12、检测该登录。运行下列命令:
$ whoami
$ groups
$ id
检测这些命令的输出

13、检测当前工作站所有的登录:
$ users
$ who
$ w
检测这些命令的输出。

实验2:切换用户帐号
任务:
1、按切换到虚拟终端3(tty3)。

2、运行pwd 命令确定你当前的目录。检测你当前的可执行文件搜索路径。检测你的用户信息。
$ id
$ pwd
$ echo $PATH

在此记录结果:
id = ______________________
pwd = _____________________
$PATH = ___________________________________________________________________

3、使用su 命令并不带 “-” 选项切换到root 用户。运行pwd 命令确认你的当前目录。检测你当前的可执行文件搜索路径。
$ su
# id
# pwd
# echo $PATH

在此记录结果:
id = ______________________
pwd = _____________________
$PATH = ___________________________________________________________________

4、退出root 帐号,回到student 帐号。
# exit

5、使用su - 切换到root 帐号。运行pwd 命令确认你的当前目录。检测你当前的可执行文件搜索路径。
$ su -
# id
# pwd
# echo $PATH

在此记录结果:
id = ______________________
pwd = _____________________
$PATH = ___________________________________________________________________

6、注销本次实验所有的登录,包括本地的和远程的。

实验3:使用man
任务:
1、查询lpr的手册(manual page)
$ man lpr

2、lpr 的-m 选项有什么用处?(提示:使用”/”键开始一次查找,输入-m,然后按回车)
___________________________________________________________________

3、在lpr 中如何改变打印纸张的宽度?
___________________________________________________________________

4、lpr 有没有用到的 FILES?(如果有,无需列出)
___________

5、在屏幕上显示manual pages中的命令名,该命令的描述(description)中提到”postscript”。

6、在上面的结果中查找可以将Postscript或者PDF转换成ASCII的命令。

Popularity: 9% [?]

Tags: , , , , , , ,

ad 468x60