Jim’s blog

June 8, 2005

Super Cow Powers【轉】

【3:26 pm By Jim】

Super Cow Powers 是 Debian 系統中一股神秘的力量。

講白了是設計師的娛樂,也就是復活節彩蛋程式(Easter Eggs)。讓某些程式呣呣叫。曾經有人將『超級牛力』視為沒有任何文件說明而回報瑕疵,然而基於娛樂價值,這些指令應該不會納入文件,繼續保持神秘,好讓新手丈二金剛摸不著腦袋直到發現這些復活節彩蛋,捧腹大笑。更好笑得是 aptitude 宣稱沒有超級牛力,大概直到駭客深究程式碼才會發現神秘的蛇吞象。還有一些非套件系統專用的程式含有此類冷笑話,請往程式碼裡翻。

如果你很喜歡見牛說話,請安裝 DebianPackages:cowsay,這是一個可設定的思想牛/多嘴牛程式。

apt-get

【Code】
$ apt-get -h
apt 0.5.24 for linux i386 compiled on Mar 16 2004 22:49:26
Usage: apt-get [options] command

    apt-get [options] install|remove pkg1 [pkg2 …]
    apt-get [options] source pkg1 [pkg2 …]

apt-get is a simple command line interface for downloading and installing packages. The most frequently used commands are update and install.

Commands:
    update - Retrieve new lists of packages
    upgrade - Perform an upgrade
    install - Install new packages (pkg is libc6 not libc6.deb)
    remove - Remove packages
    source - Download source archives
    build-dep - Configure build-dependencies for source packages
    dist-upgrade - Distribution upgrade, see apt-get(8)
    dselect-upgrade - Follow dselect selections
    clean - Erase downloaded archive files
    autoclean - Erase old downloaded archive files
    check - Verify that there are no broken dependencies

Options:
    -h This help text.
    -q Loggable output - no progress indicator
    -qq No output except for errors
    -d Download only - do NOT install or unpack archives
    -s No-act. Perform ordering simulation
    -y Assume Yes to all queries and do not prompt
    -f Attempt to continue if the integrity check fails
    -m Attempt to continue if archives are unlocatable
    -u Show a list of upgraded packages as well
    -b Build the source package after fetching it
    -V Show verbose version numbers
    -c=? Read this configuration file
    -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp

See the apt-get(8), sources.list(5) and apt.conf(5) manual pages for more information and options.

This APT has Super Cow Powers.

$ apt-get moo
         (__)
         (oo)
   /——\/
  / |    ||
 *  /\—/\
    ~~   ~~
….”Have you mooed today?”.

apt-build
【Code】
$ apt-build -v
apt-build version 0.9.2.1
$ apt-build moo
            (__)      ~
            (oo)     /
     _____\/___/
    /   /\ /  /
   ~  /  *  /
      / ___/
*—-/\
    /   \
   /    /
  ~    ~
…”Have you danced today ? Discow !”…

aptitude
這裡顯示已翻譯中文版本。
【Code】
$ aptitude –help
aptitude 0.2.14.1
用法: aptitude [-s 檔案名] [-u|-i]
    aptitude [選項] < 動作> …
動作 (如果未指定,aptitude 將進入交互模式):

    install - 安裝/升級套件
    remove - 移除套件
    purge - 移除套件並刪除其配置檔案
    hold - 將套件置於保持狀態
    unhold - 取消對一個套件的保持命令
    markauto - 將套件標記為自動安裝
    unmarkauto - 將套件標記為手動安裝
    forbid-version - Forbid aptitude from upgrading to a specific package version.
    update - 下載新/可升級套件列表
    upgrade - 執行一次安全的升級
    dist-upgrade - 執行升級,可能會安裝和移除套件
    forget-new - 忽略哪些套件是“新”的
    search - 按名稱 和/或 表達式搜尋套件
    show - 顯示套件細節資訊
    clean - 刪除已下載的套件檔案
    autoclean - 刪除舊的已下載套件檔案
    download - 下載套件的 .deb 檔案

選項:
    -h 此求助純文字
    -s 模擬動作,但是並不真正執行。
    -d 僅僅下載套件,不安裝或者移除任何東西。
    -P 總是提示確認執行動作
    -y 假設對簡單的 是/否 問題回答“是”
    -F 格式 指定顯示搜尋結果的格式;參見手冊
    -O 次序 指定如何排列顯示搜尋結果;參見手冊
    -w 寬度 指定顯示搜尋結果的格式寬度
    -f 積極地嘗試修復損壞的套件。
    -V 顯示就要安裝的套件版本。
    -D 顯示自動改變的套件的依賴關係
    -Z 顯示每個套件的安裝尺寸的變化。
    -v 顯示附加訊息。(可能會提供多次)
    -t [release] 設置將要安裝的套件的發布版本
    –with(out)-recommends, –with(out)-suggests 指定是否將推薦(建議)處理為強依賴關係。
    -S fname: 從檔案名中讀取 aptitude 的延伸狀態資訊。
    -u : 開始執行時下載新的套件列表。
    -i : 開始執行時執行安裝。

這個 aptitude 無超級牛力。
$ aptitude moo
    此軟體沒有復活節彩蛋程式。
$ aptitude -v moo
    此軟體真的沒有復活節彩蛋程式。
$ aptitude -vv moo
    我不是已經告訴你這個軟體真的沒有復活節彩蛋程式了嗎?
$ aptitude -vvv moo
    停啦!
$ aptitude -vvvv moo
    好啦,好啦,如果我給你復活節彩蛋,你是不是就閃人?
$ aptitude -vvvvv moo
    好啦,你贏了。

                            /—-\
                    ——-/      \
                   /               \
                  /                 |
—————–/                  ——–\
———————————————-

    爽了嗎?
$ aptitude -vvvvvv moo
    這是什麼? 這當然是一隻大象被一隻蛇吞掉。你有沒點常識?
$ aptitude -vvvvvvv moo
    走開啦,我正試著專心。

Comments »

The URI to TrackBack this entry is: http://jim.blogsome.com/2005/06/08/super-cow-powers/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



This work is licensed under a Creative Commons License .
Get free blog up and running in minutes with Blogsome | Theme designs available here