2010年1月23日 星期六

Note of Aptitude

Reference:
http://wiki.ubuntu-tw.org/index.php?title=Aptitude
http://man.ddvip.com/linux/debian/aptitude/index.html
  • Package status































StateDescriptionNote
p(p)urgedThe package is not installed
i(i)stanlledThe package is installed
u(u)npackedThe package is unpacked but not installed
v(v)irtualTha package is a virtual package
c(c)onfig remainsThe package is removed, but there are still configuration files
Chalf (C)onfiguredThe package is configured, but the configuration process is not complete
B(B)rokenThe package is broken because dependency can't be satisfied
E(E)rrorInternal error

  • Package Action



























ActionsDescriptionNote
h(h)oldThe package will be hold in current version
p(p)urgeThe package will be purged
d(d)eleteThe package will be deleted (config will remain)
i(i)installThe package will be installed
r(r)einstallThe package will be reinstalled
u(u)pgradeThe package will be upgraded
A(A)utomaticThe package is automatically installed

  • Some key binding

























































KeyDecriptionNote
+InstallMark the package to be installed
-RemoveMark the package to be removed
_PurgeMark the package to be purged
=HoldMark the package to be hold to prevent future upgrade
MAutoMark the package as automatically installed. It will be removed if there are no long package depends on it
mManualMark the package as manually installed
:CancelCancel pending actions to the package
gGoExecute pending actions
bBreakSearch break packages
CChangeLogSee changelog of the package
dDepends onSee dependencies of the package
rRelate toSee packages depends on the given package
fForget newClear packages shown as new
/SearchSearch the package
\Backward searchSearch the package backward
Ctrl+uRecoverRecover last action
Ctrl+tMenuMove to menu bar


  • Command line

































ActionsDescription
installInstall the package. You can also specify flags such as _,-,+,M... For example, you can use the command
"aptitude install A+ B- C_ D+M" to install A, remove B, purge C, and install D and mark D as auto
removeTo remove a package
purgeTo purge a package
updateTo update package list
safe-upgradeUpgrade currently installed packages
full-upgradeUpgrade the whole system
cleanClean the cache
auto-cleanClean unnecessary .deb in the cache
downloadDownload .deb package


  • Search Pattern
Please refer to Table 2.1 in the aptitude manual
Here are some examples in Chinese.

2010年1月17日 星期日

HTML encoder

To post HTML code on your blog, you should first HTML encode it.
That will escape interpretation of blog.

http://www.opinionatedgeek.com/dotnet/tools/htmlencode/Encode.aspx

2010年1月16日 星期六

Blogspot remove table blank

To remove the big blank in blog spot, you wrap you table like this:

<style type="text/css">.nobrtable br { display: none }</style><br /><div class="nobrtable">


Your Table...


</div>

2010年1月15日 星期五

Ubuntu component summary

Ubuntu has four components, they are grouped according to License Policy.
  • Main component contains free software and fully supported by Ubuntu.
  • Universe component contains free softwares from open source world. They are not guaranteed with fixed by Ubuntu.
  • Restricted component contains popular software which is not completely free. Ubuntu team supports the software. (The support may not complete because the license may prohibit Ubuntu from modifying for the bug fix.)
  • Multiverse component contains non-free software
Here is a summay table.



















Free softwarenon-free software
Offical Supportmainrestricted
Unofficialuniversemultiverse



Reference documents:
http://wiki.ubuntu.com/Ubuntu/ForDebianDevelopers
http://http://www.ubuntu.com/community/ubuntustory/components

2010年1月9日 星期六

Download deb file by apt-get

Use apt-get -d install PACKAGE-NAME
The deb package will be put on /var/cache/apt/archieves

ubuntu-9.10 and JDK-5

Because JDK6 is removed by Ubuntu-9.10 (Karmic)
We need to add the following line to /etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

2010年1月2日 星期六

NAND flash and NOR flash

Reference: http://en.wikipedia.org/wiki/NOR_flash

NOR Flash
  • Random access
  • Large block size
  • Long erase/program time
NOTE: 1->0 by byte basis, 0->1 by block basis

NAND Flash
  • Block access
  • Small block size
  • Fast program/erase time