• Windows软件在Linux上的等价/替代/模仿软件列表

    Last update: 16.07.2003, 31.01.2005, 27.05.2005

    您可在以下网站发现本列表最新版:
    http://www.linuxrsp.ru/win-lin-soft/
    .

    This page on other languages: Russian, Italian, Spanish, French, German.

    从Windows转向Linux的一个最大困难就是缺乏对相关软件的认识。新手总是在寻找 Windows软件的替代品,但老鸟却难以回答,因为他们对Windows可能已经所知有限:)。本列表是在我们自己的经验及本页访客所做反馈基础上列出的等价或替代或模仿软件(多谢!)。

    这个表将会经常变化,左右两侧都会加入新名字。而某些类别的右栏可能不会立即填上。将来,我们计划把这个表转向PHP/MySQL,这样访客就能够自己添加软件,为模仿软件投票或进行评论等等。

    如果您想提交新的软件,请发信至:winlintable[a]linuxrsp.ru ,写上软件名字,操作系统,描述(软件的目的之类),以及连向其官方网站的链接(如果知道)。 同时欢迎任何评论,说明,校正,提交及错误报告,如有,请发至: winlintable[a]linuxrsp.ru

    注意:
    1) 缺省情况下,本表中所有Linux软件均为 自由软件(free as in freedom)。(自由软件的定义:FSFDebian)。Linux下的专属软件会用[Prop] 标明。非自由软件(开源或相对自由但带有限制)用[NF]标明。
    2) 如果表格中是???,表示作者不知道表中应该放什么。
    3) 如果软件名字后面跟着???,表示作者对此软件不是非常确定。

    Windows和Linux在哲学上的重要区别:
    Windows软件是"all-in-one"的,即开发者会在他的产品中添加所有特性。这种思路也称为“Windows之道”。
    而UNIX/Linux的哲学是一个元件或一个软件只执行一件任务,并把它做好。这就是“Unix之道”。 Linux软件就像是乐高积木块(比如如果有拼写检查程序,它就能用在文本编辑器中或邮件客户端中;如果有一个强大的命令行下载工具,那么为它写个界面也不难)。
    这一原则非常重要,而在搜寻Windows软件替代品时更是非常重要:)。

    如想了解更多,请看"Linux and the Unix Philosophy"这本书,其中有一章专门讲了Windows和Linux的哲学差别。

    注意!本表中可能有许多错误及Bug。 (报告Bug)。

    对更喜欢Windows软件的人:
    1) "Windows"那一列并不是本表的核心,所以也并未包括所有现存软件--只有最好最流行的那些。
    2) 许多Linux软件也可以在Windows上运行--通过CygWin或其他Linux模拟环境。

    您可从以下站点获取Linux软件:
    FreshMeat.net | SourceForge.net - 最大的两个门户,可以找到任何想要的东西!!
    LinuxApps.com | IceWalkers.com | Linux.Tucows.com - I like these catalogs.
    Download.com / Linux | LinuxSoftware.org | FileWatcher.org | LinuxArchives.com - other catalogs.
    Programs / packages / libraries search systems:  RPMseek.org | Tuxfinder.com | RPMfind.net

    可在Wine/WineX上面运行的Windows软件:
    1) 可运行于Wine的Windows软件的官方列表 (from Codeweavers)。该数据库中软件超过1000种,并有分类和导航。
    2) 可在WineX上运行的Windows游戏(fromTransgaming)。这是一个搜索,这里有全部游戏的列表 (超多)。

    分类:
    1) 网络,
    2) 文件工作,
    3) 桌面与系统软件,
    4) 多媒体:
      4.1) 音频/ CD.
      4.2) 图形图像.
      4.3) 视频及其他.
    5) 办公商务,
    6) 游戏,
    7) 编辑与开发,
    8) 服务器软件,
    9) 科学与特殊软件,
    10) 模拟器,
    11) 其他及幽默。

    软件描述,可执行任务 Windows Linux
    1) Networking.
    Web browser Internet Explorer, Netscape / Mozilla, Opera [Prop], Firefox, ... 1) Netscape / Mozilla.
    2) Galeon.
    3) Konqueror.
    4) Opera. [Prop]
    5) Firefox.
    6) Nautilus.
    7) Epiphany.
    8) Links. (with "-g" key).
    9) Dillo.
    10) Encompass.
    Console web browser 1) Links
    2) Lynx
    3) Xemacs + w3.
    1) Links.
    2) ELinks.
    3) Lynx.
    4) w3m.
    5) Xemacs + w3.
    Email client Outlook Express, Netscape / Mozilla, Thunderbird, The Bat, Eudora, Becky, Datula, Sylpheed / Sylpheed-claws, Opera 1) Evolution.
    2) Netscape / Mozilla/Thunderbird messenger.
    3) Sylpheed / Sylpheed-claws.
    4) Kmail.
    5) Gnus.
    6) Balsa.
    7) Bynari Insight GroupWare Suite. [Prop]
    8) Arrow.
    9) Gnumail.
    10) Althea.
    11) Liamail.
    12) Aethera.
    13) MailWarrior.
    14) Opera.
    Email client / PIM in MS Outlook style Outlook 1) Evolution.
    2) Bynari Insight GroupWare Suite. [Prop]
    3) Aethera.
    4) Sylpheed.
    5) Sylpheed-claws.
    Email client in The Bat style The Bat 1) Sylpheed.
    2) Sylpheed-claws.
    3) Kmail.
    4) Gnus.
    5) Balsa.
    Console email client Mutt [de], Pine, Pegasus, Emacs 1) Pine. [NF]
    2) Mutt.
    3) Gnus.
    4) Elm.
    5) Emacs.
    News reader 1) Agent [Prop]
    2) Free Agent
    3) Xnews
    4) Outlook
    5) Netscape / Mozilla
    6) Opera [Prop]
    7) Sylpheed / Sylpheed-claws
    8) Dialog
    9) Gravity
    10) BNR2
    1) Knode.
    2) Pan.
    3) NewsReader.
    4) Netscape / Mozilla.
    5) Opera [Prop]
    6) Sylpheed / Sylpheed-claws.
    Console:
    7) Pine. [NF]
    8) Mutt.
    9) Gnus.
    10) tin.
    11) slrn.
    12) Xemacs.
    13) BNR2.
    Address book Outlook 1) Rubrica
    Files downloading Flashget, Go!zilla, Reget, Getright, DAP, Wget, WackGet, Mass Downloader, ... 1) Downloader for X.
    2) Caitoo (former Kget).
    3) Prozilla.
    4) Wget (console, standard).
    5) GUI for Wget: Kmago, Gnome Transfer Manager, QTget, Xget, ...
    6) Aria.
    7) Axel.
    8) Download Accelerator Plus.
    9) GetLeft.
    10) Lftp.
    Sites downloading Teleport Pro, Httrack, Wget, ...

    1) Httrack.
    2) WWW Offline Explorer.
    3) Wget (console, standard). GUI: Kmago, QTget, Xget, ...
    4) Downloader for X.
    5) Pavuk.
    6) XSiteCopy.
    7) GetLeft.
    8) Curl (console).
    9) Khttrack.

    FTP-clients Bullet Proof FTP, CuteFTP, WSFTP, SmartFTP, FileZilla, ... 1) Gftp.
    2) Konqueror.
    3) KBear.
    4) IglooFTP. [Prop]
    5) Nftp.
    6) Wxftp.
    7) AxyFTP.
    8) mc. (cd ftp://...)
    9) tkFTP.
    10) Yafc.
    11) Dpsftp. (dead project)
    Console FTP-clients FTP in Far, ftp.exe, Ncftp 1) Ncftp.
    2) Lftp.
    3) Avfs. (From any program: /#ftp:...)
    IRC-clients Mirc, Klient, VIRC, Xircon, Pirch, XChat

    1) Xchat.
    2) KVirc.
    3) Irssi.
    4) BitchX.
    5) Ksirc.
    6) Epic.
    7) Sirc.
    8) PJIRC.

    Local network chat clients without server 1) QuickChat
    2) Akeni
    3) PonyChat
    4) iChat
    1) talk (console), ktalk.
    2) Akeni.
    3) Echat.
    4) write, wall (chat between users of one machine)
    Local messaging with Windows machines WinPopUp smbclient (console). GUI:
    1) LinPopUp 2.
    2) Kpopup.
    3) Kopete.
    Instant Messaging clients ICQ Lite, ICQ Corp, MSN, AIM, Yahoo, ...
    Trillian ICQ (freeware, can replace all common IM clients), Miranda, Gaim
    1) Licq (ICQ).
    2) Centericq (Nearly all IM protocols, console).
    3) Alicq (ICQ).
    4) Micq (ICQ).
    5) GnomeICU (ICQ).
    6) Gaim. (Nearly all IM protocols)
    7) Ayttm. (Nearly all IM protocols)
    8) Kopete.
    9) Everybuddy.
    10) Simple Instant Messenger.
    11) Imici Messenger.
    12) Ickle (ICQ).
    13) aMSN (MSN).
    14) Kmerlin (MSN).
    15) Kicq (ICQ).
    16) YSM. (ICQ, console).
    17) kxicq.
    18) Yahoo Messenger for Unix.
    19) Kmess (MSN).
    20) AIM.
    21) MSNre. (console)
    Jabber IM clients JAJC, Tkabber (+activestate tcl), Psi, Exodus, WinJab, myJabber, RhymBox, Rival, Skabber, TipicIM, Vista, Yabber, Miranda, Gaim, Akeni Messenger Jabber Edition 1) Tkabber.
    2) Gabber.
    3) Psi.
    4) Gaim.
    5) Centericq (console).
    6) Ayttm.
    7) Akeni Messenger Jabber Edition.
    Monitoring sites and mailboxes, displaying news headlines or full articles WatzNew 1) Web Secretary.
    2) Knewsticker & korn.
    3) Mozilla (???).
    4) watch -n seconds lynx -dump
    Video/audio conference NetMeeting

    1) GnomeMeeting.
    2) vat/vic/wb.
    3) rat/wbd/nte.
    4) NeVoT.
    5) IVS.

    Voice communication Speak Freely

    1) Speak Freely for Unix.
    2) TeamSpeak.

    Firewall (packet filtering) BlackICE, ATGuard, ZoneAlarm, Agnitum Outpost Firewall, WinRoute Pro, Norton Internet Security, Sygate Personal Firewall PRO, Kerio Personal Firewall, ... iptables or more outdated ipchains (console, standard). Front ends:
    1) Kmyfirewall.
    2) Easy Firewall Generator.
    3) Firewall Builder.
    4) Shorewall.
    5) Guarddog.
    6) FireStarter.
    7) Smoothwall. [Prop]
    8) IPCop.
    9) Zorp.
    IDS (Intrusion Detection System) 1) BlackICE
    2) Agnitum Outpost Firewall
    3) Tripwire [prop]
    4) Kerio Personal Firewall
    1) Snort.
    2) Portsentry / Hostsentry / Logsentry.
    3) Tripwire [GPL].
    4) Tripwall.
    5) AIDE.
    6) ViperDB.
    7) Integrit.
    8) Cerberus Intrusion Detection System.
    9) MIDAS NMS.
    Port scanning detection ??? 1) Pkdump.
    Making the system more securely ??? 1) Bastille.
    2) Linux Security Auditing Tool.
    Visual route VisualRoute [Prop] 1) Xtraceroute.
    2) VisualRoute. [Prop]
    3) Mtr.
    4) Geotrace.
    Content (ad / popup) filtering Proxomitron, ATGuard, Agnitum Outpost Firewall, Privoxy, MS ISA server, Guidescope, ... 1) DansGuardian.
    2) Squid.
    3) Squidguard.
    4) Privoxy.
    5) JunkBuster.
    6) Zorp.
    7) Fork.
    8) Redirector.
    Traffic control / shaping WinRoute Pro, ... 1) IP Relay.
    2) CBQ (from iproute2 package).
    3) tc (from iproute2 package).
    4) LARTC.
    Traffic accounting

    Netstat, Tmeter, ...

    1) Tcp4me.
    2) Getstatd.
    3) Ipacct.
    4) Ipac-ng.
    5) Ipaudit.
    6) Lanbilling.
    7) SARG (full Squid traffic).
    8) Talinux.
    9) NetUP UserTrafManager.
    10) MRTG.
    11) NetTop.
    Peer-to-peer clients / servers, file sharing (p2p) Morpheus (Gnutella), WinMX, Napster, KaZaA (Fasttrack), eDonkey [Prop], eMule, TheCircle, Bittorrent, SoulSeek, Direct Connect 1) Mldonkey. (eDonkey, Soulseek, Fasttrack, Gnutella, Open Napster, Direct Connect, BitTorrent)
    2) LimeWire. (Gnutella)
    3) Lopster. (OpenNAP)
    4) Gnapster. (OpenNAP)
    5) eDonkey. (eDonkey) [Prop]
    6) cDonkey. (eDonkey)
    7) Gift client / server / fasttrack plugin (Fasttrack)
    8) ed2k_gui.
    9) Gtk-Gnutella. (Gnutella)
    10) Qtella. (Gnutella)
    11) Mutella. (Gnutella, console)
    12) TheCircle.
    13) f\r/e\e/n\e/t. (fully anonymous p2p)
    14) GNUnet.
    15) Lmule. (eDonkey)
    16) Xmule. (eDonkey)
    17) Bittorrent.
    18) PySoulSeek (Soulseek).
    19) Loophole. (WinMX) [Prop]
    20) Direct Connect.
    21) QuickDC. (Direct Connect).
    22) OverNet.
    23) Apollon.
    24) GrapeWine. (fully anonymous p2p)
    25) Snark. (Bittorrent)
    "Hotline" p2p protocol clients / servers ??? Clients:
    1) Gtkhx.
    2) Fidelio.
    3) GHX. [Prop]
    Servers:
    1) Synapse.
    2) HSX.
    Program for working with sound modem with many functions - from answerback and AON to fax device Venta Fax, PrimaFax 1) Gfax. (???)
    2) PrimaFax. [Prop, 99$]
    3) mgetty + voice + sendfax.
    4) vgetty.
    Work with faxes WinFax 1) HylaFax.
    2) Fax2Send. [Prop]
    3) Efax.
    4) VSI-FAX. [Prop]
    Dialup Vdialer, etc 1) Kppp.
    2) X-isp.
    3) wvdial. (Front ends: X-wvdial, kvdial, gtkdial).
    4) Gppp.
    5) Kinternet.
    6) Rp3.
    7) pppconfig + pon + poff.
    8) Modem Lights.
    9) Netcount. (console)
    FTN editor Golded 1) Golded.
    2) Golded+.
    3) Msged.
    4) Qded.
    FTN tosser FastEcho, hpt 1) hpt.
    2) CrashEcho.
    3) Qecho.
    4) CrashMail II.
    5) Fidogate - gate to news.
    6) ifmail - gate to news.
    FTN mailer SF-Mail, T-Mail 1) ifcico.
    2) qico.
    3) Bforce.
    4) Binkd.
    Remote management 1) VNC, Virtual Network Computing
    2) Remote Administrator (Radmin) [Prop]
    3) Remote Assistance [Prop]
    4) Symantec pcAnywhere [Prop]
    5) Windows Terminal Server [Prop]
    6) Rdesktop [Prop]
    7) Radmin [Prop]
    8) PC-Duo [Prop]
    9) Huey PC Remote Control (only for NT) [Prop]
    10) Timbuktu Pro [Prop]
    11) LapLink [Prop]
    12) GoToMyPC [Prop]
    13) Bo2k and other trojans

    1) VNC, Virtual Network Computing.
    2) ssh.
    3) Remote management is built-in in XFree86.
    4) Remote management is built-in in KDE 3.1. ("desktop sharing").
    5) Rdesktop Client.
    6) rsh / rlogin.
    7) telnet.
    8) Gtelnet.
    9) x0rfbserver.
    10) KDE Universal Remote Desktop.

    Transmission of the files on modem HyperTerminal, Terminate, etc 1) Minicom + lrzcz + Kermit.
    2) Msterm.
    3) Xtel.
    4) uucp.
    5) lrzsz + cu from uucp.
    Work with ssh Putty, Irlex, cygwin + ssh 1) Kssh.
    2) ssh / openssh.
    3) GTelnet. (Telnet, SSH, Rlogin)
    Network monitoring tool Dumeter, Netmedic 1) Gkrellm.
    2) Big Brother.
    3) Etherape.
    4) Nagios.
    5) Tkined.
    6) MRTG.
    7) Rrdtool.
    8) PIKT.
    9) Autostatus.
    10) bcnu.
    11) mon.
    12) Sysmon.
    13) Spong.
    14) SNIPS.
    15) iptraf (console).
    16) Ksysguard.
    17) OpenNMS.
    18) tcpdump.
    Network maintance tool HP OpenView, MS SMS, Tivoli 1) HP OpenView agents. [Prop]
    2) Big Brother.
    3) Cheops.
    4) Tkined.
    5) OpenNMS.
    Protocols analysing, sniffing

    Sniffer Pro, EtherPeek (TokenPeek, AiroPeek), Windump, Ethereal, MS Network Monitor, Iris, Lan Explorer, NetSniffer, Snort, ...

    1) Ethereal.
    2) Tcpdump.
    3) Etherape.
    4) Ntop.
    5) ipxdump. (+ipxparse for parsing)
    6) Snort.
    Security scanner ShadowScan, ISS, Retina, Internet Scanner 1) Nessus.
    2) Nmap.
    Routing MS RRAS 1) iproute2 + iptables.
    2) GateD. [Prop]
    3) GNU Zebra.
    Utilites and libraries for Ethernet/IP testing lcrzo lcrzo
    IP-telephony Buddyphone [Prop], Cisco SoftPhone 1) GNU Bayonne.
    2) Openh323.
    3) OpenPhone.
    4) tkPhone.
    5) NauPhone.
    Sharing data/files Windows shares 1) NFS.
    2) Samba.
    3) Samba-TNG.
    4) FTP.
    ??? Windows Domain, Active Directory 1) Samba.
    2) Ldap.
    3) yp.
    Viewing Windows-network Network neighborhood 1) Samba.
    2) KDE Lan Browser, lisa
    3) LinNeighborhood.
    4) xSMBrowser.
    5) Komba2.
    6) Konqueror.
    ADSL 1) RASPPPOE 1) rp-pppoe.
    2) Pptp client.
    Distributed computing

    All projects.
    1) United Devices.
    2) Seti @ Home.
    3) Folding @ Home.
    4) Genome @ Home.

    All projects.
    1) Distributed.net.
    2) Seti @ Home.
    3) Folding @ Home.
    4) Genome @ Home.
    5) D2ol.
    * Some versions for Linux run only in console mode.
    IPSEC protocol - FreeSWAN.
    VRML viewer and editor

    ???

    1) White Dune.
    Work with Ebay ??? 1) Bidwatcher.
    2) Work with files.
    File manager in FAR and NC style FAR, Norton Commander, Disco Commander, Volcov Commander, etc 1) Midnight Commander.
    2) X Northern Captain.
    3) Deco (Demos Commander).
    4) Portos Commander.
    5) Konqueror in MC style.
    6) Gentoo.
    7) VFU.
    8) Ytree.
    File manager in Windows Commander style Total Commander (former Windows Commander) 1) Krusader.
    2) Kcommander.
    3) FileRunner (TCL/TK).
    4) Linux Commander.
    5) LinCommander.
    6) Rox, Rox-Filer.
    7) Emelfm.
    8) Midnight Commander.
    9) Worker.
    File manager in Windows style Windows Explorer / Internet Explorer 1) Konqueror.
    2) Gnome-Commander.
    3) Nautilus.
    4) Endeavour Mark II.
    5) XWC.
    Visual Shell ??? 1) vshnu: the New Visual Shell.
    Quick viewing of local HTML documents 1) Internet Explorer
    2) Microsoft Document Explorer
    1) Dillo. (Russian language patches - here).
    2) Konqueror.
    3) Nautilus.
    4) Lynx / Links.
    Viewing all operations with files Filemon Filemon.
    Work with UDF Roxio (former Adaptec) UDF Reader, Roxio Direct CD Linux-UDF.
    Work with multi session CD + recovering information from faulty multi session disks IsoBuster CDFS.
    Work with compressed files 1) WinZip
    2) WinRar
    3) 7-Zip
    4) WinACE
    5) UltimateZip

    1) Ark (kdeutils).
    2) Gnozip.
    3) KArchiveur.
    4) Gnochive.
    5) FileRoller.
    6) Unace.
    7) LinZip.
    8) TkZip.

    Console archivers arj, rar, zip, tar, gzip, bzip2, lha... 1) tar, gzip, bzip2.
    2) Unarc.
    3) Lha. (on Japanese)
    4) Infozip.
    5) Arj.
    6) Avfs. (The support of any archive from any program - file.zip#/...).
    7) Zoo.
    8) RAR.
    9) CAB Extract.
    Program for files and directories comparison 1) Beyond Compare.
    2) Araxis Merge.
    3) WinMerge
    4) Minimalist GNU For Windows (diff.exe)
    5) Unison

    1) Mgdiff.
    2) diff, patch.
    3) Xemacs.
    4) Xdelta. (make patches for binary files)
    5) Meld.
    6) Xxdiff.
    7) Unison.

    Batch file renaming Plugins to TotalCommander, ... 1) GPRename. (Perl-based)
    2) Plugins for MC (???)
    3) Desktop / System software.
    Text editor Notepad, WordPad, TextPad, Vim, Xemacs, ...

    1) Kedit (KDE).
    2) Gedit (Gnome).
    3) Gnotepad.
    4) Kate (KDE).
    5) KWrite (KDE).
    6) Nedit.
    7) Vim.
    8) Xemacs.
    9) Xcoral.
    10) Nvi.
    11) Ozeditor.

    Console text editor 1) Vim
    2) Emacs
    3) Editor from FAR, editor from DN, ...

    1) Vim.
    2) Emacs.
    3) Nano. (It's a free implementation of pico)
    4) joe.
    5) Fte.
    6) Jed.
    7) CoolEdit.

    Multi-purpose text and source code editor SciTE, UltraEdit, MultiEdit, Vim, Xemacs, ...

    1) Kate (KDE).
    2) Nedit.
    3) CodeCommander.
    4) SciTE.
    5) Quanta Plus.
    6) Vim.
    7) Xemacs.
    8) Mcedit (comes with mc).
    9) Jed.
    10) Setedit. (Turbo Vision looking style)
    11) HT editor.

    Text editor with cyrillic encodings support Bred, Rpad32, Aditor, Vim, Xemacs

    1) Kate (KDE).
    2) Nedit.
    3) Fte (console).
    4) Patched version of Midnight Commander.
    5) Vim.
    6) Xemacs.

    Viewing PostScript

    1) RoPS
    2) GhostView

    1) GhostView.
    2) Kghostview.
    3) GV.
    4) GGV.
    Viewing PDF 1) Adobe Acrobat Distiller
    2) GhostView
    1) Acrobat Reader. [Prop]
    2) Xpdf.
    3) GV.
    4) GGV.
    5) GhostView.
    6) Kghostview.
    Creating PDF 1) Adobe Acrobat Distiller
    2) GhostView
    3) Ghostscript
    1) Any Linux WYSIWYG program -> print to file -> ps2pdf. (Here's an article about this).
    2) Adobe Acrobat Distiller. [Prop]
    3) PStill. [Shareware]
    4) PDFLatex.
    5) Xfig.
    6) Ghostscript.
    7) Tex2Pdf.
    8) Reportlab.
    9) GV.
    10) GGV.
    11) GhostView.
    12) Kghostview.
    13) Panda PDF Generator.
    Crypto PGP, GnuPG + Windows Privacy Tools 1) GnuPG (console) + GPA, KGpg, and other frontends.
    2) PGP. [Prop]
    Disc volume encryption EFS (standard), PGP-Disk, BestCrypt, Private Disk Light 1) Loop-aes.
    2) CFS.
    3) TCFS.
    4) BestCrypt.
    5) CryptFS.
    Task scheduler mstask, nnCron cron, at (standard, console). GUI: Kcron.
    Outlook scheduler Outlook scheduler 1) KOrganizer.
    Virtual CD VirtualDrive, VirtualCD, Daemon Tools, ... 1) Virtual CD Kernel Modul.
    2) "cp /dev/cdrom mycd.iso" + "mount -o loop mycd.iso /mnt/cdrom/".
    Text recognition (OCR) Recognita, FineReader 1) ClaraOcr.
    2) Gocr.
    3) Kooka.
    Translators (cyrillic) Promt, Socrat Ksocrat (???)
    Eng-rus dictionaries (cyrillic) 1) ABBYY Lingvo
    2) Socrat
    3) JaLingvo
    4) phpMyLingvo
    1) Mueller.
    2) Ksocrat.
    3) JaLingvo.
    4) phpMyLingvo.
    5) dict+Kdict.
    6) DictX.
    7) Groan.
    8) Mova.
    9) Slowo.
    10) Stardict.
    Work with scanner Programs on CD with scanner, VueScan 1) Xsane.
    2) Kooka.
    3) Xvscan. [Prop]
    4) VueScan. [Prop]
    Antivirus AVG AntiVirus, NAV, Dr. Web, TrendMicro, F-Prot, Kaspersky, ... 1) Dr. Web. [Prop]
    2) Trend ServerProtect. [Prop]
    3) RAV Antivirus. [Prop] (Bought by Microsoft?)
    4) OpenAntivirus + AMaViS / VirusHammer.
    5) F-Prot. [Prop]
    6) Sophie / Trophie.
    7) Clam Antivirus.
    8) Kaspersky. [Prop]
    9) YAVR.
    System configuration Control Panel, Msconfig, RegEdit, WinBoost, TweakXP, Customizer XP, X-Setup, PowerToys, Config NT, ...

    1) setup (Red Hat).
    2) chkconfig (Red Hat).
    3) redhat-config-. (Red Hat 8.0).
    4) xf86config, xf86cfg.
    5) Linuxconf.
    6) Drakeconf.
    7) Webmin.
    8) yast and yast2 (SuSE).
    9) sysinstall (FreeBSD).
    10) /dev/hands :).

    Boot managers System Commander, PowerQuest Boot Magic, GAG, ... 1) Grub.
    2) Lilo.
    3) ASPLoader.
    4) Acronis OS Selector [Prop].
    5) Ranish Partition Manager.
    6) osbs.
    7) Symon.
    8) Smart Boot Manager.
    9) Xosl.
    10) GAG.
    Hard disk partitions manager 1) PowerQuest Partition Magic [Prop]
    2) Acronis PartitionExpert [Prop]
    3) Paragon Partition Manager [Prop]
    4) Partition Commander [Prop]

    1) PartGUI. (GUI for partimage and parted)
    2) GNU Parted. (GUI - QTParted).
    3) Partition Image.
    4) fips.
    5) Diskdrake (Mandrake).
    6) Paragon Partition Manager [Prop].
    7) Acronis PartitionExpert [Prop]. (review)

    LVM + soft-RAID + parted + ... -

    EVMS.

    Backup software ntbackup (standard), Legato Networker [Prop] 1) Legato Networker. [Prop]
    2) Lonetar. [Prop]
    3) Disk Archive.
    4) Bacula.
    5) Taper.
    6) dump / restore. (console, standard)
    7) Amanda (console).
    8) Mondo Rescue. (backups that boot and auto restore themselves to disk)
    Making images of disk partitions 1) DriveImage
    2) Ghostpe
    1) PartitionImage (GUI - PartGUI).
    2) dd (console, standard).
    3) Mondo Rescue.
    Machine mirroring over network 1) ImageCast
    2) Norton Ghost

    1) UDP Cast.
    2) Techteam's UDP Cast Disks.
    3) Ghost for Unix (g4u).

    Task manager TaskMan (standard), TaskInfo, ProcessExplorer NT. 1) top (console, standard).
    2) Gtop, Ktop.
    3) Ksysguard.
    4) "ps aux|more", "kill "
    Automatic switch between English and Russian when you type Punto Switcher, Keyboard Ninja, Snoop No analogs :(.
    Mouse gestures Sensiva 1) Kgesture.
    2) wayV.
    3) Optimoz.
    TV program ??? Home Portal.
    Text to speech MS text to speech 1) KDE Voice Plugins.
    2) Festival.
    3) Emacspeak.
    4) VoiceText.
    Speech recognition ViaVoice, DragonNaturally Speaking Yes, there are no usable speech recognition packages. But:
    1) Sphinx.
    2) ViaVoice. (almost dead...)
    Stream text processing 1) Minimalist GNU For Windows (sed.exe)
    2) perl
    1) sed, awk.
    2) perl.
    PIM / DB / hierarchical notebook with tree view TreePad [Prop], Leo, CueCards 1) TreePad Lite. [Prop]
    2) Yank.
    3) TreeLine.
    4) Gjots.
    5) Leo.
    6) Hnb - hierarchical notebook.
    7) TuxCards.
    Program for quick switching between resolutions and frequencies Integrated with system, comes on CD with video card

    1) Multires.
    2) Ctrl+Alt+"-", Ctrl+Alt+"+".
    3) Fbset. (when using framebuffer)

    Search and replace text in files 1) Integrated with system
    2) Indexing service
    3) HTMLChanger
    4) Any file manager
    1) find (console, standard).
    2) slocate (console, standard).
    GUI:
    1) Gsearchtool.
    2) Kfind.
    3) Any file manager
    Local search engine with SGBD for indexing

    1) Indexing service (???)
    2) mnoGoSearch. [prop for Windows]

    1) mnoGoSearch.
    2) ASPSeek.

    System monitoring System monitor (built-in) 1) top (console, standard).
    2) Gkrellm.
    3) Ksysguard.
    4) Survivor.
    5) "Hot-babe". (If you can be shocked by nudity, don't use it :).
    Program for logs viewing Event Viewer (built-in)

    1) Xlogmaster.
    2) Analog.
    3) Fwlogview. (firewall)

    Data Recovery Tools R-Studio (supports Linux partitions) 1) e2undel.
    2) myrescue.
    3) TestDisk.
    4) unrm.
    5) Channel 16.
    Text files encoder with automatic detection of character set ???

    1) Enca.
    2) Jconv.
    3) Xcode. (cyrillic)
    4) Asrecod. (cyrillic)

    Alarm clock MindIt! 1) KAlarm.
    Work with Palm Palm Desktop 1) Kpilot.
    2) Jpilot.
    Allows to carry on Palm .html files iSilo 1) iSilo.
    2) Plucker.
    Low-level optimization
    (chipset, pci-bus)
    Powertweak

    1) Powertweak-Linux.

    Bible On-Line Bible, The SWORD 1) BibleTime (KDE)
    2) Gnomesword (Gnome)
    Convenient mouse scrolling Mouse Imp

    ???

    Automatic change of desktop background ??? 1) Background Buddy.
    Convenient switching of the keyboard language ???

    1) GSwitchIt.

    Windows registry editor RegEdit Kregedit :).
    4.1) Multimedia (audio / CD).
    Useful links: - Linux MIDI & Sound Applications - many links and resources.
    Sound Software - lots of it.
    Music / mp3 / ogg players

    1) Winamp
    2) Zinf
    3) SnackAmp
    4) Soritong
    5) Apollo
    6) K-jofol 2000
    7) Sonique
    8) C-4
    9) Media Box Audio / Video Workstation 5
    10) Blaze Media Pro
    11) NEX 3
    12) Real Jukebox
    13) Windows Media Player

    1) XMMS (X multimedia system).
    2) Noatun.
    3) Zinf. (former Freeamp)
    4) Winamp.
    5) Xamp.
    6) GQmpeg.
    7) SnackAmp.
    8) Mplayer. (Frontend: Kplayer).
    9) <a href="htt
  • SCM(software configuration management ) 软件配置网,不错,给我不少启迪。这方面我了解的不多。只用过一些,呵呵,主要是cvs,free就是力量啊。 http://www.scmchina.net/scm/index.html

    google相关信息:google一直是个很有想象力的公司,它的企业文化让人非常向往,更可怕的是它只是成立了7年的一家new startup(当然现在已经长成了it行业中的一个可怕的霸主)。这里列出一些有趣的信息,关于如何进入google(all the artical from article, since I haven't enter it up to now,haha)

    ------------------------------------spliter----------------------------------------------------

    怎样进入Googlehttp://blog.cathayan.org/item/1123


    这题目我以前写过,虽然只写了这么一小段:

    GoogleBlog说,每个Google员工进入Google的方式都各不相同,有的是就发个简历,有的是毕业就去,有的是内部员工推荐,也有的是因为发明了用条码卡片播放音乐的机器,所以他们要推出一系列文章来介绍这个过程。第一位是做系统管理员的,因为半年前发现了Google的域名解析上的一个问题,在同大人物通过几次邮件之后,就得到推荐了。


    这个小段居然被人转

    今天又看到这个系列故事的第2篇,又讲了一位Google工程师的面试经历。他在Google的数据中心干活。当初他刚毕业到墨西哥去玩,玩之前投了简历,然后在墨西哥他找到个网吧看了下信,居然有回复,后来他经历一次电话、一次现场面试,就被录用了。他总结说,满足条件的可能有不少,但他的Coverletter写得好,上面是他穿着Google T-shirt,我想是个照片吧;并且,拍了许多Google的马屁--如果真心的话似乎不应该再叫PMP,是吧?

    他最后总结说:这个故事告诉我们,1- 千万不要低估你最喜欢的T-shirt的威力,2- 出去玩时也不要忽略邮件。

    当然,除去这种故事,我们还经常听到某大牛去了Google,比如互联网之父,Mozilla核心成员,还有Gaim开发领袖。这些故事告诉我们,在计算机技术上够厉害,Google是可以进的。

    当然,还有故事告诉我们,技术不牛的也可以通过6轮面试进入Google。

    而这位资深Google员工告诉我们,Google也要“聪明的好人”。

    这个系列故事是发表在Google官方Blog上的,Blogspot大体是看不了,那就一下,结果还是
    --------------------------------------spliter end-------------------------------------------
    一个国内opensource的club:中科院自动化所自由软件协会,不少有用实在的资料http://fsa.ia.ac.cn/?q=node我这样给连接真土(画外音:你本来就是个土人-_-)

  • 2005-12-03

    万能编辑器Vim

    万年编辑器Vim

    (original link:http://blog.cathayan.org/item/1080[keep the author copy right])


    如果文本编辑器变得越来越重要,我想大家是不必吃惊的,因为文本似乎和网络有着某种联系,*nix系统也都喜欢它。win上面有editplus, ultraedit,都很强大,但是都是商业软件;后来我用过crimson editor, notepad++等免费的,也还可以;Linux下面各桌面系统自带的编辑器不少,gedit,bluefish,后来Carlos推荐了leafpad,确实是小巧快速,可以充当notepad的替代。

    其实我还有一点Vi使用经验,以前用过一点Sun工作站(Vi正是Sun首席科学家,BSD UNIX主创人员,天才人士之一的Bill Joy的作品。vim是多个变种之一,主要作者和维护人是荷兰人士Bram Moolenaar。)的缘故,知道它分插入模式和命令模式,还会用hjkl来移动光标,平时就用这几招来对付Linux下面配置文件的编辑,也将就没有问题。有时写点小程序,翻译点文档啥的,似乎都没有问题。但在win上面,我一直用不起来,虽然我一直都装的有gVim。好像是因为在Windows上面太过于依赖鼠标,而不是习惯于打键盘了。

    这一切一直延续到两周多以前,那天跑去听了水木Vim版主的一个报告,果然是深受鼓舞,又学了几招高妙的,又改了下vimrc,这两周来基本没再开过其他编辑器。这个故事告诉我们人还是社会动物,互相之间鼓动一下有时是很必要的。

    版主的报告也有PDF下载可看(好像是openoffice做出来的),我从中学到不少东西。比如列编辑和map一些命令。我把jk都map到gj/gk,这样的操作比较适合文本多的,如果是程序多就未必很方便了。还从中学到了gvim,以前我一向是在term里用的,这个图形化的确实有好处,比如可以用更多字体--版主推荐bitstream vera suns mono这个字体,它可以把I1lOo0这些东西区别开来。同时gvim还在菜单上提供一些很有用的命令,如果一时记不得不妨一用。

    昨天刚用一个菜单命令把人震了一把,就是语法下面的“转换成HTML”,简直是太酷了,不论你敲的是HTML,还是CSS,还是C或者Java,一个命令就转成标准的HTML代码,可以直接贴到Blog上去那种,并且还带语法高亮显示。实在是强到让人无语。

    最近又挖到了中文版VimDoc,也就是文档了,这个项目我早就知道却一直没有注意过,最近才认真看了下,居然是可以安装到Vim下面来的,并且如果设好helplang=cn的话,每次敲:help就会自动使用中文版,实在是方便。据大侠说这东西应该每天有空时就过一遍,读上一百遍之后就可以成为高手了。

    下面是我从各处抄来的vimrc文件,用vim转成了HTML,贴出来看个景儿其中多有不明白的。

    [update]刚才又学了两招,在转HTML时,可以let html_no_pre=1就可以不用PRE标签,let html_use_css=1就是CSS风格,这些:help 2html即可看到。真不是一般强啊。

    1 " Vim configuration file
    2 set fileencodings=prc
    3 set encoding=prc
    4 " DEFAULT OPTIONS
    5 set nocompatible " make Vim default to nicer options
    6
    7 " READING OPTIONS
    8 set modeline modelines=1 " use settings from file being edited
    9
    10 " INPUT OPTIONS
    11 set mouse=a " use the mouse
    12
    13 " DISPLAY OPTIONS
    14 "set background=light " better colors for white terminals
    15 set number " show line numbers
    16 set ruler " show line and column information
    17 set notitle " don't set change terminal's title
    18 set backspace=indent,eol,start " backspaces can go over lines
    19 set tabstop=4 " tabs are every 8 columns
    20 set softtabstop=4
    21 set shiftwidth=4
    22
    23
    24 " jump only one 'line' when wrap set on
    25 nnoremap j gj
    26 nnoremap k gk
    27 vnoremap j gj
    28 vnoremap k gk
    29 nnoremap <Down> gj
    30 nnoremap <Up> gk
    31 vnoremap <Down> gj
    32 vnoremap <Up> gk
    33 inoremap <Down> <C-o>gj
    34 inoremap <Up> <C-o>gk
    35
    36
    37 map <S-Insert> <MiddleMouse>
    38 map! <S-Insert> <MiddleMouse>
    39
    40 imap <C-s> <C-o>:update<CR>
    41
    42 set cin
    43 set sm
    44 set et
    45 set cino=:0g0t0(sus
    46 set hls
    47 set whichwrap=b,s,<,>,[,]
    48 set fo+=mB
    49 set mousemodel=popup
    50 set selection=inclusive
    51
    52
    53
    54 :if version >= 600
    55 set listchars=eol:$,tab:>-,trail:-,extends:>,precedes:<
    56 :elseif version >= 500
    57 set listchars=eol:$,tab:>-,trail:-,extends:+
    58 :endif
    59
    60 set laststatus=2 " always show status line
    61 set showmode " always show command or insert mode
    62 set shortmess=lnrxI " brief messages, don't show intro
    63 set showcmd " show partial commands
    64 set more " use a pager for long listings
    65
    66 "set nowrap " do not wrap long lines
    67 set wrap
    68 set lbr
    69 syntax on " use syntax highlighting
    70
    71 " Cursor movement
    72 nnoremap <Down> gj
    73 nnoremap <Up> gk
    74 vnoremap <Down> gj
    75 vnoremap <Up> gk
    76 inoremap <Down> <C-o>gj
    77 inoremap <Up> <C-o>gk
    78
    79 nnoremap <End> g$
    80 nnoremap <Home> g0
    81 vnoremap <End> g$
    82 vnoremap <Home> g0
    83 inoremap <End> <C-o>g$
    84 inoremap <Home> <C-o>g0
    85
    86
    87 if (has("gui_running"))
    88 set wrap
    89 set guioptions+=b
    90 colo torte
    91 else
    92 set wrap
    93 colo ron
    94 endif
    95
    96 "set the guifont
    97 if (has("gui_running"))
    98 set guifont=Bitstream\ Vera\ Sans\ Mono\ 11
    99 source $VIMRUNTIME/delmenu.vim
    100 source $VIMRUNTIME/menu.vim
    101 endif
    102
    103 " SAVING OPTIONS
    104 set noexpandtab " don't change tabs into spaces
    105 set backupext=~ " backup files end in ~
    106
    107 " EDITING OPTIONS
    108 set autoindent " keep indenting at same level
    109 set noerrorbells visualbell " flash screen instead of ringing bell
    110 set esckeys " allow arrow keys in insert mode
    111 set showmatch " show matching brackets
    112
    113 " SEARCH OPTIONS
    114 set nohlsearch " don't highlight search patterns
    115 set incsearch " search while typing
    116 set ignorecase " make searches case-insensitive
    117
    118 " JavaID
    119 :let java_highlight_all=1
    120 :let java_highlight_java_beans=1
    121
    122 " MISCELLANEOUS OPTIONS
    123 set dictionary=/usr/share/dict/words " get words from system dictionary
    124 set magic " regexp chars have special meaning
    125
    126 filetype plugin on
    127
    128
    129 " learn from carlos@linuxsir, to use multi cjk charset
    130 "
    131 " multi-encoding setting
    132 if has("multi_byte")
    133 "set bomb
    134 set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
    135 " CJK environment detection and corresponding setting
    136 if v:lang =~ "^zh_CN"
    137 " Use cp936 to support GBK, euc-cn == gb2312
    138 set encoding=cp936
    139 set termencoding=cp936
    140 set fileencoding=cp936
    141 elseif v:lang =~ "^zh_TW"
    142 " cp950, big5 or euc-tw
    143 " Are they equal to each other?
    144 set encoding=big5
    145 set termencoding=big5
    146 set fileencoding=big5
    147 elseif v:lang =~ "^ko"
    148 " Copied from someone's dotfile, untested
    149 set encoding=euc-kr
    150 set termencoding=euc-kr
    151 set fileencoding=euc-kr
    152 elseif v:lang =~ "^ja_JP"
    153 " Copied from someone's dotfile, untested
    154 set encoding=euc-jp
    155 set termencoding=euc-jp
    156 set fileencoding=euc-jp
    157 endif
    158 " Detect UTF-8 locale, and replace CJK setting if needed
    159 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
    160 set encoding=utf-8
    161 set termencoding=utf-8
    162 set fileencoding=utf-8
    163 endif
    164 else
    165 echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
    166 endif
    167
  • “memory”比较特殊,可能是内嵌汇编中最难懂部分。为解释清楚它,先介绍一下编译器的优化知识,再看C关键字volatile。最后去看该描述符。

    1、编译器优化介绍
       内存访问速度远不及CPU处理速度,为提高机器整体性能,在硬件上引入硬件高速缓存Cache,加速对内存的访问。另外在现代CPU中指令的执行并不一定严格按照顺序执行,没有相关性的指令可以乱序执行,以充分利用CPU的指令流水线,提高执行速度。以上是硬件级别的优化。再看软件一级的优化:一种是在编写代码时由程序员优化,另一种是由编译器进行优化。编译器优化常用的方法有:将内存变量缓存到寄存器;调整指令顺序充分利用CPU指令流水线,常见的是重新排序读写指令。对常规内存进行优化的时候,这些优化是透明的,而且效率很好。由编译器优化或者硬件重新排序引起的问题的解决办法是在从硬件(或者其他处理器)的角度看必须以特定顺序执行的操作之间设置内存屏障(memory barrier),linux 提供了一个宏解决编译器的执行顺序问题。
                                void Barrier(void)
    这个函数通知编译器插入一个内存屏障,但对硬件无效,编译后的代码会把当前CPU寄存器中的所有修改过的数值存入内存,需要这些数据的时候再重新从内存中读出。

    2、C语言关键字volatile
        C语言关键字volatile(注意它是用来修饰变量而不是上面介绍的__volatile__)表明某个变量的值可能在外部被改变,因此对这些变量的存取不能缓存到寄存器,每次使用时需要重新存取。该关键字在多线程环境下经常使用,因为在编写多线程的程序时,同一个变量可能被多个线程修改,而程序通过该变量同步各个线程,例如:
        DWORD __stdcall threadFunc(LPVOID signal)
        {
           int* intSignal=reinterpret_cast<int*>(signal);
           *intSignal=2;
           while(*intSignal!=1)
                     sleep(1000);
           return 0;
        }
    该线程启动时将intSignal 置为2,然后循环等待直到intSignal 为1 时退出。显然intSignal的值必须在外部被改变,否则该线程不会退出。但是实际运行的时候该线程却不会退出,即使在外部将它的值改为1,看一下对应的伪汇编代码就明白了:
       mov ax,signal
        label:
        if(ax!=1)
                  goto label

       对于C编译器来说,它并不知道这个值会被其他线程修改。自然就把它cache在寄存器里面。记住,C 编译器是没有线程概念的!这时候就需要用到volatile。volatile 的本意是指:这个值可能会在当前线程外部被改变。也就是说,我们要在threadFunc中的intSignal前面加上volatile关键字,这时候,编译器知道该变量的值会在外部改变,因此每次访问该变量时会重新读取,所作的循环变为如下面伪码所示:
       label:
        mov ax,signal
        if(ax!=1)
                 goto label

    3、Memory
         有了上面的知识就不难理解Memory修改描述符了,Memory描述符告知GCC:
         1)不要将该段内嵌汇编指令与前面的指令重新排序;也就是在执行内嵌汇编代码之前,它前面的指令都执行完毕
         2)不要将变量缓存到寄存器,因为这段代码可能会用到内存变量,而这些内存变量会以不可预知的方式发生改变,因此GCC插入必要的代码先将缓存到寄存器的变量值写回内存,如果后面又访问这些变量,需要重新访问内存。

       如果汇编指令修改了内存,但是GCC 本身却察觉不到,因为在输出部分没有描述,此时就需要在修改描述部分增加“memory”,告诉GCC 内存已经被修改,GCC 得知这个信息后,就会在这段指令之前,插入必要的指令将前面因为优化Cache 到寄存器中的变量值先写回内存,如果以后又要使用这些变量再重新读取。

       使用“volatile”也可以达到这个目的,但是我们在每个变量前增加该关键字,不如使用“memory”方便。
  • VI高级命令集锦

    http://www.chinaunix.net/jh/8/16368.html
    鉴于大家在使用VI 的时候有一定的陌生,在这里借花献佛,从兄弟版[SHELL]中整理出以下关于VI编程的高级技巧,希望对大家学习UNIX有所帮助,并希望大家能结合使用HPUX的心得体会对这些经验进行进一步的扩展。

    1.交换两个字符位置

    xp
    2.上下两行调换
    ddp
    3.把文件内容反转
    :g/^/m0/ (未通过)

    4.上下两行合并
    J
    5.删除所有行
    dG
    6.从当前位置删除到行尾
    d$
    7.从当前位置复制到行尾
    y$ 如果要粘贴到其他地方 p 就可以了


    由于vi 是建立在 EX 上的 所以 当键入 : 时就来到了 EX 命令状态
    8.
    :ab string strings
    例如 ":ab usa United States of America" ,
    当你在文见里插入 usa 时
    United States of America 就蹦出来了
    9.
    :map keys new_seq
    定义你当前 键盘命令
    10.
    :set [all]
    vi or ex 的编辑状态
    如 显示每行 :set nu
    11.
    在命令状态下,nyy表示拷贝从光标行起的下n行内容,p表示paste,可刚复制的内容粘贴在光标处的
    下面。

    12.
    单个字符替换用r,覆盖多个字符用R,用多个字符替换一个字符用s,整行替换用S

    13.

    :%s/old_word/new_word/g
    这个指令是于在整个文件中替换特定字符串

    14.光标控制

    k:上移 nk 上移n行
    j:下移 nj 下移n行


    将光标移到第n行,按下 mk
    将光标移到第m行,按下 "ay'k
    即将第n到m的行存到a寄存器,以此类推,b,c........寄存器等

    这样就可以将你常用的需要复用的内容粘贴到不同的寄存器中以备用


    想粘贴到某处,直接将光标移到某地,按下 ‘ap 即可,以此类推,b,c........寄存器等

    在当前屏幕中
    H 跳到第一行
    M 跳到中间一行
    L 跳到最后一行

    15.
    表8-2 删除命令
    删除命令操作
    d l 删除当前字符(与x命令功能相同)
    d 0 删除到某一行的开始位置
    d ^ 删除到某一行的第一个字符位置(不包括空格或TA B字符)
    d w 删除到某个单词的结尾位置
    d 3 w 删除到第三个单词的结尾位置
    d b 删除到某个单词的开始位置
    d W 删除到某个以空格作为分隔符的单词的结尾位置
    d B 删除到某个以空格作为分隔符的单词的开始位置
    d 7 B 删除到前面7个以空格作为分隔符的单词的开始位置
    d) 删除到某个语句的结尾位置
    d 4) 删除到第四个语句的结尾位置
    d( 删除到某个语句的开始位置
    d } 删除到某个段落的结尾位置
    d { 删除到某个段落的开始位置
    d 7 { 删除到当前段落起始位置之前的第7个段落位置
    d d 删除当前行
    d /t e x t 删除从文本中出现“ t e x t”中所指定字样的位置,一直向前直到下一个该字样所出现的
    位置(但不包括该字样)之间的内容
    d fc 删除从文本中出现字符“c”的位置,一直向前直到下一个该字符所出现的位置(包括
    该字符)之间的内容
    d tc 删除当前行直到下一个字符“ c”所出现位置之间的内容
    D 删除到某一行的结尾
    d $ 删除到某一行的结尾
    5 d d 删除从当前行所开始的5行内容
    d L 删除直到屏幕上最后一行的内容
    d H 删除直到屏幕上第一行的内容
    d G 删除直到工作缓存区结尾的内容
    d 1 G 删除直到工作缓存区开始的内容

    修改命令操作
    c l 更改当前字符
    c w 修改到某个单词的结尾位置
    c 3 w 修改到第三个单词的结尾位置
    c b 修改到某个单词的开始位置
    c W 修改到某个以空格作为分隔符的单词的结尾位置
    c B 修改到某个以空格作为分隔符的单词的开始位置
    c 7 B 修改到前面7个以空格作为分隔符的单词的开始位置
    c 0 修改到某行的结尾位置
    c) 修改到某个语句的结尾位置
    c 4) 修改到第四个语句的结尾位置
    c( 修改到某个语句的开始位置
    c } 修改到某个段落的结尾位置
    c { 修改到某个段落的开始位置
    c 7 { 修改到当前段落起始位置之前的第7个段落位置
    c tc 修改当前行直到下一个字符c所出现位置之间的内容
    C 修改到某一行的结尾
    c c 修改当前行
    5 c c 修改从当前行所开始的5行内容


    .重复上一次修改!

    表8-4 替换命令
    替换命令操作
    s 将当前字符替换为一个或多个字符
    S 将当前行替换为一个或多个字符
    5 s 将从当前字符开始的5个字符替换为一个或多个字符


    vi替换使用规则:
    :g/s1/s/s2/s3/g
    第一个g表示对每一个包括s1的行都进行替换,第二个g表示对每一行包括s1的行所有的s2都用s3替换
    s表示替换,s2是要被替换的字符串,他可以和s1相同(如果相同的话用//代替),s3是替换字符串


    16.

    fx
    往右移动到 x 字符上
    Fx
    往左移动到 x 字符上
    tx
    往右移动到 x 字符前
    Tx
    往左移动到 x 字符后
    (注意:以上四个命令中,其中x是键入的字符)
    ;
    分号,配合 f 和 t 使用,重复一次
    ,
    逗号,配合 f 和 t 使用,反方向重复一次

    17. vi 环境选项 Solaris ksh

    noautoindent nomodelines noshowmode
    autoprint nonumber noslowopen
    noautowrite nonovice tabstop=8
    nobeautify nooptimize taglength=0
    directory=/var/tmp paragraphs=IPLPPPQPP LIpplpipnpbtags=tags /usr/lib/tags
    noedcompatible prompt tagstack
    noerrorbells noreadonly term=vt100
    noexrc redraw noterse
    flash remap timeout
    hardtabs=8 report=5 ttytype=vt100
    noignorecase scroll=11 warn
    nolisp sections=NHSHH HUuhsh+c window=23
    nolist shell=/bin/ksh wrapscan
    magic shiftwidth=8 wrapmargin=0
    mesg noshowmatch nowriteany

    For C-Shell:
    setenv EXINIT "set nu"
    For Bourne or Korn Shell:
    EXINIT="set nu"; export EXINIT
    For Korn Shell Only (alternate method):
    typeset -x EXINIT="set nu"
    在 .profile 里设置 vi 的环境选项 , 以上均测试过


    18.标记文本

      mchar   用字母char标记当前光标的位置
      `char   移至char所标记处
      'char   移至char标记所在行的开头处
      "     移至当前行上一次所在位置(在光标移动之后)――一个双引号
      ''    移至当前行上第一次所在位置的行的开头处(在光标移动之后)――两个单引号


    19.
    同时vi多个文件时,CTRL-SHIFT-6回到上一个文件,在本次vi的文件和上次vi的文件之间切换。
    但是我发现一个BUG:在用CTRL-SHIFT-6切换到上一个文件后,用:args查看多文件vi状态时,
    屏幕底部仍然显示目前vi的是刚才的文件。
    (在HP-UX,Solaris,AIX上通过)

    也可以使用:
    :e#
    进行切换

    20.
    sco 下VI 要在文本前同样的字符加用
    %s/^/要加的内容/g 要在文本后同样的字符加
    %s/$/要加的内容/g

    21.
    如何去掉文本中的 ^M 硬回车?不必用binary传回去再ascii传回来的方式,用shell或者unix语句实现。

    cat filename |tr -d '\015' >newfile
    不同的unix系统还存在一些其他不同的命令,如:doscp
    sed 也可以实现这个功能.

    dos2unix filename filename2
    反之
    unix2dos filename filename2

    在vi 中用:$s/^M//g
    ^是crtl-V crtl-M


    22.如何在“unix命令行”下将一个文件的某字符串用另一个串换掉

    sed 's/string1/string2/gp' file1 > file2


    23.将/etc/hosts下所有的地址都ping 2次

    1 #/usr/bin/sh
    2 #grad /etc/hosts and ping each address
    3 cat /etc/hosts|grep -v '^#' | while read LINE
    4 do
    5 ADDR=`awk '{print $1}'`
    6 for MACHINE in $ADDR
    7 do
    8 ping $MACHINE -n 2
    9 done
    10 done

  • 2005-10-30

    diff && path- -

                                          

    diff
      diff是生成源码补丁的必备工具。其命令格式为:

     diff [命令行选项] 原始文件 新文件

    常用命令行选项如下:

       -r 递归处理目录     -u 输出统一格式(unified format)

       -N patch里包含新文件   -a patch里可以包含二进制文件

      它的输出在stdout上,所以你可能需要把它重定向到一个文件。diff的输出有“传统格式”和“统一格式”之分,现在大都使用统一格式:

      传统格式示例:

       [hahalee@builder]$ diff a.txt b.txt

       1a2

       > here we insert a new line

       3d3

       < why not this third line?

      统一格式示例:

       [hahalee@builder]$ diff -u a.txt b.txt

       --- a.txt Thu Apr 6 15:58:34 2000

       +++ b.txt Thu Apr 6 15:57:53 2000

       @@ -1,3 +1,3 @@

       This is line one

       +here we insert a new line

       and this is line two

       -why not this third line?

      通过比较可以看出,传统格式的patch文件比较小,除了要删除/插入的行外没有冗余信息。统一格式则保存了上下文(缺省是上下各三行,最少需要两行),这样,patch的时候可以允许行号不精确匹配的情况出现。另外,在patch文件的开头明确地用---和+++标示出原始文件和当前文件,也方便阅读。要选用统一格式,用 u 开关。

    通常,我们需要对整个软件包做修改,并生成一个patch文件,下面是典型的操作过程。这里就要用到前面介绍的几个命令行开关了:

      tar xzvf software.tar.gz # 展开原始软件包,其目录为software

      cp _a software software-orig # 做个修改前的备份

      cd software

      [修改,测试……]

      cd ..

      diff _ruNa software-orig software > software-my.patch

      现在我们就可以保存software-my.patch做为这次修改的结果,至于原始软件包,可以不必保存。等到下次需要再修改的时候,可以用patch命令把这个补丁打进原始包,再继续工作。比如是在linux kernel 上做的工作,就不必每次保存几十兆修改后的源码了。这是好处之一,好处之二是维护方便,由于unified patch格式有一定的模糊匹配能力,能减少原软件包升级带来的维护工作量(见后)


    patch

      patch命令跟diff配合使用,把生成的补丁应用到现有代码上。常用命令行选项:

      patch [命令行选项] [待patch的文件[patch]]

      -pn patch level(n是数字) -b[后缀] 生成备份,缺省是.orig

    为了说明什么是patch level,这里看一个patch文件的头标记。

      diff -ruNa xc.orig/config/cf/Imake.cf xc.bsd/config/cf/Imake.cf

      --- xc.orig/config/cf/Imake.cf Fri Jul 30 12:45:47 1999

      +++ xc.new/config/cf/Imake.cf Fri Jan 21 13:48:44 2000

      这个patch如果直接应用,它会去找xc.orig/config/cf目录下的Imake.cf文件,假如你的源码树的根目录是缺省的xc而不是xc.orig,除了mv xc xc.orig之外,有无简单的方法应用此patch呢?patch level就是为此而设:patch会把目标路径名砍去开头patch level个节(由/分开的部分)。在本例中,可以用下述命令:cd xc; patch _p1 < /pathname/xxx.patch 完成操作。注意,由于没有指定patch文件,patch程序默认从stdin读入,所以用了输入重定向。

      如果patch成功,缺省是不建备份文件的(注:FreeBSD下的patch工具缺省是保存备份),如果你需要,可以加上 b 开关。这样把修改前的文件以“原文件名.orig”的名字做备份。如果你喜欢其它后缀名,也可以用“b 后缀”来指定。

      如果patch失败,patch会把成功的patch行给patch上,同时(无条件)生成备份文件和一个.rej文件。.rej文件里是没有成功提交的patch行,需要手工patch上去。这种情况在原码升级的时候有可能会发生。

      关于二进制文件的说明:binary文件可以原始方式存入patch文件。diff可以生成(加-a选项),patch也可以识别。如果觉得这样的patch文件太难看,解决方法之一是用uuencode处理该binary文件。

    rcs

      单个文件的版本控制/管理,适合对少量文件进行版本控制,不适合小组进行项目协作开发。优点:使用简便;缺点:功能有限。RCS常用命令有ci/co/rcsdiff。
      rcs用一个后缀为“,v”的文件保存一文件的内容和所有修改的历史信息,你可以随时取出任意一个版本,用rcs保存程序就不必为不同版本分别备份。
    ci _ check in,保存新版本
    co _ check out,取出当前(或任意)版本

    cvs是多平台的,开发可以在多种平台比如,可以把linux上的CVS Repository通过samba export出来在Windows平台上做开发。现在很多软件包里包含有*NIX/Windows/MacOS等多平台支持代码,cvs的跨平台特性可提供最好的多平台开发支持。

      不过,cvs的操作是直接基于文件系统的,在需要大量远程协作的场合问题很多,远程的NFS mount效率太差,也会有安全问题。新版本的cvs自身内建了Client/Server支持,也可以利用Unix上传统的远程交互手段来通讯。

      1,通过rsh(也可用ssh替换)

      2,使用cvs自带的C/S用户认证:pserver(缺省端口2401)

      3,使用kerberos的gserver、kserver


    # 可以把库文件拷贝到 /etc/ld.so.conf 中列举出的任何目录中,并以
    root 身份运行 ldconfig;或者
    # 运行 export LD_LIBRARY_PATH='pwd',它把当前路径加到库搜索路径中去。
    1> ldd 工具
    ldd 用来显示执行文件需要哪些共享库, 共享库装载管理器在哪里找到了需要的共享库.

    2> soname

    共享库的一个非常重要的,也是非常难的概念是 soname--简写共享目标名(short for shared object name)。这是一个为共享库(.so)文件而内嵌在控制数据中的名字。如前面提到的,每一个程序都有一个需要使用的库的清单。这个清单的内容是一系列库的 soname,如同 ldd 显示的那样,共享库装载器必须找到这个清单。

    soname 的关键功能是它提供了兼容性的标准。当要升级系统中的一个库时,并且新库的 soname 和老的库的 soname 一样,用旧库连接生成的程序,使用新的库依然能正常运行。这个特性使得在 Linux 下,升级使用共享库的程序和定位错误变得十分容易。

    在 Linux 中,应用程序通过使用 soname,来指定所希望库的版本。库作者也可以通过保留或者改变 soname 来声明,哪些版本是相互兼容的,这使得程序员摆脱了共享库版本冲突问题的困扰。

    查看/usr/local/lib 目录,分析 MiniGUI 的共享库文件之间的关系

    3> 共享库装载器

    当程序被调用的时候,Linux 共享库装载器(也被称为动态连接器)也自动被调用。它的作用是保证程序所需要的所有适当版本的库都被调入内存。共享库装载器名字是 ld.so 或者是 ld-linux.so,这取决于 Linux libc 的版本,它必须使用一点外部交互,才能完成自己的工作。然而它接受在环境变量和配置文件中的配置信息。

    文件 /etc/ld.so.conf 定义了标准系统库的路径。共享库装载器把它作为搜索路径。为了改变这个设置,必须以 root 身份运行 ldconfig 工具。这将更新 /etc/ls.so.cache 文件,这个文件其实是装载器内部使用的文件之一。

    对软件的评价:代码的稳定性、友好性、代码的易读性、统一的风格、技巧。

    1。尽量少的使用全局变量

    2。局部变量一定要初始化,特别是指针变量

    3。成员函数功能单一,不要过分追求技巧,函数体不要过长。

    4。最好有头文件

    5。关于变量名的长短问题

    6。设计函数时考虑到通用性

    7。申请内存时,一定先要释放。注意 if 问题。

    8。对浮点数比较大小时注意不要使用 ==

    9。最好不要用 goto 语句

    10。所有成员函数要单出口单入口

    11。函数中,要先检验参数的合法性

    12。最好所有的函数都有返回值,表明错误的原因。

    13。注释问题

    14。类型转化一律用显示转换。

    15。定义宏说,参数使用括号,结果也应该括起来

    #define SUB(a,b) ((a)-(b))

    3*SUB(3,4-5);

    16。变量长度一定要用 sizeof 来求

    17。malloc 后千万别忘 free 及使指针等于 NULL。

    18。字符串拷贝时尽量少使用 sprintf,而使用 memcpy,最后别忘加上'\0'

    19。慎重选择编译时的优化选项。

    20。小组开发时,注意代码风格的统一。