Unix/Linux
文章平均质量分 66
bonny95
行至水穷处,坐看云起时。
展开
-
《Advanced Programming in the UNIX Environment》读书笔记(1)
1、系统口令文件通常为/etc/passwd。口令文件中的登录项由7个以冒号分隔的字段组成:登录名、加密口令、数字用户ID、数字组 ID、注释字段、起始目录以及shell程序。 2、不能出现在文件名中的字符只有两个:/和空操作符(null)。 当创建一个新目录时,自动创建了两个文件名:.和..。.引用当前目录,..引用父目录。 A process can chang原创 2008-07-10 22:55:00 · 791 阅读 · 0 评论 -
《Advanced Programming in the UNIX Environment》读书笔记(2)
v/:* {behavior:url(#default#VML);}o/:* {behavior:url(#default#VML);}w/:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}Normal07.8 磅02原创 2008-07-13 22:51:00 · 785 阅读 · 0 评论 -
硬盘安装Fedora 9成功
昨天晚上半夜(5月13日晚23:56分)我登陆到fedora项目的主页一看,My God,Fedora 9已经可以下载了!我立马开始下载。由于速度只有几百K/S,只好先睡觉。 今天早上6:30就起来了,第一件事就是准备将Fedora 9刻录到光盘,然后准备安装。几天前就已经将光盘买好了,Nero也装好了,就等着刻呢。非常恶心的是,我一连试了三张白盘,一次也没刻录成功!气得原创 2008-05-14 19:43:00 · 1590 阅读 · 0 评论 -
Fedora 9安装星际译王(stardict)
Fedora 9安装星际译王(stardict)一直苦于Linux下没有好用的翻译软件,一直再用Google的在线辞典,感觉还好。但Google在线词典最大的问题就是不能屏幕取词,而且用起来也不怎么方便,于是下决心找到一款比较好的翻译软件。Google了一下,发现了星际译王的口碑不错,于是去http://stardict.sourceforge.net/cn/download.php 上下原创 2008-07-31 22:23:00 · 1460 阅读 · 0 评论 -
《UNIX教程》读书笔记(一)
《UNIX教程》读书笔记Part I UNIX Shell1 文件类型d 目录。l 符号链接(指向另一个文件)。s 套接字文件。b 块设备文件。c 字符设备文件。p 命名管道文件。- 普通文件,或者更准确地说,不属于以上几种类型的文件。2 该变权限位chmod命令的一般格式为: chmod [who] operator [permission] filenamew h o的含义是:u原创 2008-08-21 13:04:00 · 730 阅读 · 0 评论 -
硬盘安装Fedora 9时死机?
前天晚上在Fedora9下装完ATI显卡的驱动以后,升级系统,昨天早晨起来一看,我的本本过热休眠了(发现Fedora下经常出现这种情况,而Windows下很少出现,可见Linux的电源管理确实还有问题),当时没有管它。昨天晚上到了半夜,决定切换到Fedora下玩一玩,结果发现进不了图形界面了,字符界面也还闪来闪去的,实在没办法,重装。非常不幸的是,重装到一半的时候,CPU过热又歇菜了。这时重启发现原创 2008-06-06 10:11:00 · 1178 阅读 · 0 评论 -
[转]VI文档间复制
(说明:本文系转载自互联网,原文出处:http://hi.baidu.com/349426204/blog/item/cab88e342b61783e5ab5f5f6.html)大家在vi编辑中,常常遇到想把文件a里面的一行或多行,复制到b文件里面去 (可能很多人不知道怎么办),该怎么做了? 下面是几中方法: 1.如果你有多台机器,而且是联网的,你可以用netterm虚拟终端,teln转载 2008-08-28 19:48:00 · 1438 阅读 · 0 评论 -
无题
人生本是一出戏,角色变化是定律;别把自己当头猪,人人都要靠努力。 昨天一天做了两件事,都不成功:一是在Fedora 9下安装mplayer,不能成功安装gui,中英文的帖子看了无数,很多人对此都无计可施,只有一人给出了关于libgtk的动态链接库要降级才能成功安装的一句话提示。担心搞不好系统崩溃,暂时放弃。不过在命令行下播放mp3的体验也还不错。 另外一件事就是为我的原创 2008-06-08 11:24:00 · 492 阅读 · 0 评论 -
Fedora 9手动升级Firefox的方法
以下方法不一定通用,是本人根据亲身经历总结而成,仅供参考。(1)下载Firefox安装包,解压。(2)第一次运行该安装包中的firefox会自动进行设置。(3)如果无法显示flash,自动安装Adobe Flash Player插件;如果自动安装不成功,手动下载.rpm安装包安装;如果手动安装.rpm安装包安装仍不能成功,手动下载.tar.gz安装包,解压并提取里面的libflashplayer.原创 2008-06-11 00:09:00 · 892 阅读 · 0 评论 -
Fedora9下 多媒体播放器的设置
[说明]以下资料系在网上搜到的,如有侵权,请联系本人。 [免责声明]尽管以下方法对于本人的系统有效,但不保证对其他系统有效。 一、totem-xine(http://www.5dlinux.com/article/1/2007/linux_10731.html) 故障原因:yum install totem-xine安装后播放rmvb无声音 解决方法:yum install -y转载 2008-06-15 21:43:00 · 1739 阅读 · 0 评论 -
Fedora 9中Firefox启动后进入www.s.com的解决方法
几个月来,自从手动装上Firefox3.0之后,在Fedora桌面上点击图标启动Firefox一直进入www.s.com(本来我的主页设置为iGoogle),而且图标也不再显示为Firefox的图标。很是让人郁闷。(注:据说该问题只是在图形界面下点击图标才会出现,若在命令行下面直接用命令启动Firefox不会有这个问题。)今天搜了一下,发现有这个问题的人还比较多,但大多没有解决方法。找了半天之后总原创 2008-09-15 10:06:00 · 2008 阅读 · 0 评论 -
《Beginning Linux Programming》读书笔记(二)
3 基本的Shell命令3.1 Redirecting Output 管道重定向:> 对文件追加:>> For">", by default, if the file already exists, then it will beoverwritten. If you want to change the default behavior, you can uset原创 2008-09-14 23:07:00 · 592 阅读 · 0 评论 -
MPlayer - Fedora Guide
MPlayer - Fedora GuideMauriat Miranda (http://www.mjmwired.net/contact/)Other Guides/ResourcesPublished: 17 December 2003 (updated: 8 October 2007)Post To: del.icio.us, furl, digg, spurl, gmai转载 2008-06-27 08:45:00 · 1988 阅读 · 0 评论 -
开源授权协议
<!-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } --> [说明]:本文摘自《程序员》2008年06月刊许洪波教授的《开源授权协议(License)初探》一文,版权归原作者所有。1、OSI(www.opensource.org)是目前世界上针对开源原创 2008-06-27 10:04:00 · 1098 阅读 · 0 评论 -
《Linux程序设计》读书笔记(一)
《Linux程序设计》读书笔记1、编译C程序的技巧 在调用C语言编译器的时候可以通过给出“-I”标志来引用保存在下级子目录或者非标准目录下的头文件,如: $ gcc -I /usr/openwin/include fred.c它会使编译器在/usr/openwin/include的子目录和标准目录两个地方去查找fred.c程序里所包含的头文件。 用grep查找含有某些特原创 2008-09-11 15:26:00 · 628 阅读 · 0 评论 -
[转]苹果雄起之我见
[说明]:尽管本文系转载,但转载本身就说明了本人同意作者的观点。苹果雄起之我见 ugmbbc发布于 2008-06-17 18:23:03| 5465 次阅读 字体:大 小 打印预览var ReTitle = 回复:苹果雄起之我见;感谢爆米花的投递 新闻来源:原创 不要为苹果华丽的表面所迷惑,深藏其后的是一颗温暖的心。转载 2008-06-27 15:10:00 · 549 阅读 · 0 评论 -
《Beiginning Linux programming || Linux 程序设计》读书笔记(四)
(21) Trap The trap command is used to specify theactions to take on receipt of signals. A common use is to tidy up ascript when it is interrupted. The trap command is passed the action to ta原创 2008-09-23 19:57:00 · 774 阅读 · 0 评论 -
FTP命令简介
FTP Guide A short guide to using FTP ============================# FTP (short for File Transfer Protocol) is extremely useful for transferring原创 2008-09-25 09:36:00 · 1808 阅读 · 0 评论 -
Solaris环境变量
~/.profile 是在用户的主目录下的一个文件,每次用户登陆都会执行这里边的ENV环境变量设置。/etc/profile是一个全局的环境变量设置,只要登陆系统的用户都会执行里面的ENV环境变量设置~/.kshrc是在用户的主目录下面的,每次执行KSH下面的子shell的时候,都会执行这里面的ENV环境变量设置。~/.dtprofile是在用户的主目录下面的,在这里设置你进入CDE时原创 2008-09-27 15:13:00 · 1006 阅读 · 0 评论 -
UNIX Workshop Notes
v/:* {behavior:url(#default#VML);}o/:* {behavior:url(#default#VML);}w/:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);} Normal 0 false false原创 2008-10-21 20:20:00 · 767 阅读 · 0 评论 -
Perl笔记(一)
1 Perl中所有数字内部格式一致,只有双精度浮点数(Perl内部没有整数值)。2 Perl中允许用下划线来分隔比较长的整数,如612980400283768和612_980_400_283_768是相同的值。3 Perl中的非十进制整数:八进制以0开头,十六机制以0x开头,二进制以0b开头。4 Perl中的数字操作符除加减乘除之外,还有模数运算符(%)和指数操作符(**)。对于%,两个操作数首先原创 2008-10-06 21:17:00 · 803 阅读 · 0 评论 -
Tcl/Tk Notes (1)
Tcl/Tk Notes Part I TCL Overview 1 Everything Is a String In Tcl, evrything is a string, and you have to explic原创 2008-10-27 16:57:00 · 749 阅读 · 0 评论 -
Tcl/Tk Notes (2)
Part II Strings and Pattern Matching 1 The string Command The general syntax of the Tcl string command is: string operation stringvalue otherargs原创 2008-10-28 21:38:00 · 894 阅读 · 0 评论 -
Perl中的特殊变量
Perl中的特殊变量1. $&, $`,$ 用在模式匹配中$& 用来存放匹配中的值$` 用来存放匹配中之前所有字符$ 用来存放匹配中之后所有字符如:#!/usr/bin/perl -wif("Hello good there,neigbor hello" =~ /S(w+),/){ print "That actually matched $&. ";原创 2009-01-06 15:16:00 · 928 阅读 · 0 评论 -
Shell向Perl脚本中传递变量的方法
方法一:In shell using export to output a variable, and in perl using special variable %ENV to get shells variables.i.e.:--- shell box---$ /bin/ksh# export x=Foo# perl -e print $ENV{"x"}----------原创 2009-01-12 16:01:00 · 5336 阅读 · 0 评论 -
Perl Notes(II)
Part II Network Programming With Perl1 Input/Output Basics1.1 FilehandlesFilehandles are the foundation of networked applications. In this section we review the ins and outs of filehandles. Even i原创 2009-01-13 14:08:00 · 1377 阅读 · 0 评论 -
How do I add a directory to my include path (@INC) at runtime?
How do I add a directory to my include path (@INC) at runtime?Here are the suggested ways of modifying your include path, including environment variables, run-time switches, and in-code statements:th转载 2009-01-13 14:05:00 · 943 阅读 · 0 评论 -
Korn Shell(K Shell) Notes (I)
Korn Shell Notes 1 Useful Cmdswc - display a count of lines, words and characters in a file. It can be used to count the numbers together with other commands, such as ls, who and so on.原创 2008-11-20 13:18:00 · 601 阅读 · 0 评论 -
Korn Shell Notes(II)
Korn Shell Notes 1 Useful Cmdswc - display a count of lines, words and characters in a file. It can be used to count the numbers together with other commands, such as ls, who and so on.原创 2008-11-24 12:44:00 · 758 阅读 · 0 评论 -
Solaris中对gvim进行设置
Solaris中对gvim进行设置1 将tab宽度设置为4:在$HOME下面建立文件.exrc把set shiftwidth=4 tabstop=4 添加进去----------------------------------------------------------以下为转载,原文地址:http://blog.chinaunix.net/u/9465/showart_278161.html原创 2008-11-26 21:11:00 · 1691 阅读 · 0 评论 -
[转]dbx Command Summary
dbx Command Summary Here is a local copy of short explanation of commands and dbx faq .Basic Dbx Shell Commands!!execute the previous commandrexecute the previous command转载 2009-02-04 23:02:00 · 733 阅读 · 0 评论 -
NULL Pointer Bugs
NULL Pointer BugsA NULL character pointer is NOT the same as a pointer to a NULL string. In Solaris, the following program will lead to a "Segmentation Fault".#include #include int main(){ char *st原创 2008-12-03 20:54:00 · 545 阅读 · 1 评论 -
UNIX Commands Used to Debug
UNIX Commands Used to Debug1. trussbjbldc:/home/bonny >2> truss -p 6535read(11, 0xFFBED6C8, 1024) (sleeping...)2. ps -fu bjbldc:/home/bonny >> ps -fu bonny UID PID原创 2009-03-03 10:51:00 · 688 阅读 · 0 评论 -
Named Pipe
This page is a copy of http://developers.sun.com/solaris/articles/named_pipes.html.Introduction to Interprocess Communication Using Named Pipes Print-friendly VersionBy Faisal Faruqui, July 2002 Cont转载 2008-12-16 23:38:00 · 1100 阅读 · 0 评论 -
由服务器名字(Host name)获得IP地址
一下代码可以根据host name获得IP地址:#include #include #include #include #include int main(int argc,char **argv){ struct hostent *hptr; struct in_addr *in_addr_ptr; char *ptr,**pptr,**listptr,*addr_ptr;原创 2008-12-24 22:19:00 · 2135 阅读 · 0 评论 -
Perl Notes(I)
Part I Programming Perl1 Perl Data Types1.1 Funny CharactersTypeCharacterExampleIs a name for:Scalar$$centsAn individual value (number or string)Array@@large原创 2008-12-29 09:17:00 · 1103 阅读 · 0 评论 -
[转]在C语言中使用正则表达式
在C语言中使用正则表达式如果用户熟悉Linux下的sed、awk、grep或vi,那么对正则表达式这一概念肯定不会陌生。由于它可以极大地简化处理字符串时的复杂度,因此现在已经在许多Linux实用工具中得到了应用。千万不要以为正则表达式只是Perl、Python、Bash等脚本语言的专利,作为C语言程序员,用户同样可以在自己的程序中运用正则表达式。 标准的C和C++都不支持正则表达式转载 2009-04-11 21:10:00 · 1163 阅读 · 0 评论 -
近期遇到的几个Solaris 10 的问题
公司正在逐渐把server升级为Solaris 10, 对于新平台我非常陌生(当然了,对于以前的Solaris 9也不怎么懂),遇到了几个值得记录下来的问题。 1. $HOME目录几乎所有文件(夹)的owner和group都被改为nobody昨天在工作时遇到了问题,自己无法解决,求助于同事。同事帮忙查了半天,发现了我的$HOME下的所有的文件和文件夹的owner和group都被改为no原创 2009-04-30 16:10:00 · 790 阅读 · 0 评论 -
设置KSH的自动补全和历史命令功能
本文系转载,原文请见:http://blog.chinaunix.net/u1/54041/showart_1356638.html。 方法一:set -o vi历史命令功能(esc -,esc +)自动补全文件名(esc /)。 方法二:set -o emacs历史命令功能(ctrl-n,ctrl-p),自动补全文件名(按两次esc)。 找不到自动补全命令的功能,还是b转载 2009-05-15 04:58:00 · 1696 阅读 · 0 评论 -
在UNIX/Linux下查看某个进程的详细参数
如果要在UNIX/Linux下查看某个进程的详细参数, 可以用命令: ps -axuww|grep 但需要注意的是,在Solaris下,存在两个版本的ps:一是/usr/bin/ps;一是/usr/bin/ps。只有/usr/bin/ps可以用于上述命令。"/usr/ucb/ps" 是从BSD UNIX中继承而来的,而/usr/bin/ps从AT&T SVR4原创 2009-05-27 04:41:00 · 2153 阅读 · 0 评论