List of common decompress & compress tools in unix

For my future reference:  (整理自互联网)

check folder size:

du -sh *


1. 7-zip:  (.7z file)


tar -jxvf p7zip_9.20.1_src_all.tar.bz2
cd p7zip_9.20.1
make install

7za {a|d|l|e|u|x} 压缩包文件名 {文件列表或目录,可选}

a 向压缩包里添加文件或创建压缩包,如向001.7z添加001.jpg,执行:7za a 001.7z 001.jpg;将001目录打包执行:7za a 001.7z 001;
d 从压缩里删除文件,如将001.7z里的001.jpg删除,执行:7za d 001.7z 001.jpg
l 列出压缩包里的文件,如列出001.7z里的文件,执行:7za l 001.7z
e 解压到当前目录,目录结构会被破坏,如001.rar内有如下目录及文件123/456/789.html,
执行:7za e 001.rar,目录123和456及文件789.html都会存放在当前目录下。
x 以完整路径解压。



2. tar:  (decompress)

  1. Type at the command prompt
    tar xvzf file-1.0.tar.gz – to uncompress a gzip tar file (.tgz or .tar.gz)
    tar xvjf file-1.0.tar.bz2 – to uncompress a bzip2 tar file (.tbz or .tar.bz2)
    tar xvf file-1.0.tar – to uncompressed tar file (.tar)
    • x = eXtract, this indicated an extraction c = create to create )
    • v = verbose (optional) the files with relative locations will be displayed.
    • z = gzip-ped; j = bzip2-zipped
    • f = from/to file … (what is next after the f is the archive file)
  2. The files will be extracted in the current folder (most of the times in a folder with the name ‘file-1.0’).

Continue reading List of common decompress & compress tools in unix


Using Stanford Phoenix++ MapReduce to count the most frequent words in Wikipedia Database

Log of a quick and fun afternoon project.

1. Download Wikipedia English-language Database:

Download pages-articles.xml.bz2

Uncompress it ro pages-articles.xml (around 45GB)

2. Download Phoenix++:

make binary file and then find ‘word_count’ in ‘tests’ folder

3. copy wordcount and pages-articles.xml to the same folder

./word_count pages-articles.xml 1000 >wikiwords.txt

Using wordcount program to count top 1000 popular words from wiki database

4. Result: (Using 8 Xeon E5 server, 128 processing cores) Continue reading Using Stanford Phoenix++ MapReduce to count the most frequent words in Wikipedia Database


早先看到一段AMMO NYC 和/Drive Network上的一段视频,关于Used Car Pre-Purchase Inspection. 其中包含了一个详细的检查项目check list,现在回想十分有用,找出链接来.

链接中的pdf包含了详尽的检查项目列表,无论是已有车维护,或是挑选Used Car都十分有用



Continue reading 关于二手车的选购检查

Install github atom text editor on Ubuntu 14.04 x64

Official guide:

Quote here:

  git clone
  cd atom
  script/build # Creates application at /tmp/atom-build/Atom
  sudo script/grunt install # Installs command to /usr/local/bin/atom
  script/grunt mkdeb # Generates a .deb package at /tmp/atom-build

My log (for future re-installation): current version 0.95-f86280a

#go to
#download node.js source code
cd ~/tmp/nodejs
tar xzvf node-v0.10.28.tar.gz
cd node-v0.10.28
./make test
#if failure occures at any stage, fix those. In my case, I failed at 'curl'.
sudo apt-get install curl
sudo make install
sudo apt-get install npm
sudo apt-get install libgnome-keyring-dev
sudo npm config set python /usr/bin/python2 -g
cd ~/tmp/atom
git clone
cd atom/script
sudo ./build
#err occurs at build: node-gyp, my solution:
sudo apt-get remove gyp
#This works
sudo ./build  #this will create app at /tmp/atom-build/Atom
cd ~/atom/atom
sudo npm install -g grunt-cli
#don't know if above command is necessary or not
npm install
cd build
sudo grunt install #this will install atom to /usr/local/bin/atom
sudo grunt mkdeb #this will make .deb package at /tmp/atom-build
#To run
sudo atom
#package management



一直想实践一下使用六分仪(Sextant), 简单估计一下纬度.


1. 30cm直尺一把 (至少16cm)

2. 量角器.  (没有怎么办? 我网上找了一个pdf打印了一个

3. 细绳子一条 (实践下来细一些,柔软的比较好)

4.重物 (硬币,回形针)

5. 胶带, 白纸



2. 绳子另一端用胶带固定一个重物

3.将量角器180度边与直尺一边对齐,将量角器倒着固定在靠近尺子左端约2-3cm处 (量角器刻度左边是0度,右边是180度). 量角器与直尺中间夹一张白纸

4. 在户外,找到北极星(北斗七星勺子末端延长5倍). 将尺子右端瞄准北极星, 从左端望去,确保直尺左端,右端,北极星成一条直线.

5.这时候绳子自由悬挂的角度,在量角器上读出z. 例如读出55度,那么90度减去这个度数,就是纬度了,这个例子中纬度就是35度



Continue reading 简易六分仪与夜晚纬度估测

My Ubuntu X Forwarding Settings

Remote: Ubuntu Desktop 14.04 LTS x64

Local: Windows 8.1, Putty, Xming


Enable Ubuntu X forwarding:

sudo apt-get install openssh-server
#edit /etc/ssh/ssh_config, X11Forward yes
#check if xauth is installed, to view current list
#xauth list

To change the feel and fonts when program is forwarded to Xming:

sudo apt-get install gtk-chtheme
#Call it at the termial opened in Xming
#Set a theme you like

I choose the theme ‘Radiance’ with font ‘Ubuntu Light 10’


At windows side:

1. In putty, enable X11 Forwarding in the settings

2.Install Xming, Xming Fonts. If necessary, copy the fonts you like to Xming folder.

To increase the font size of Xming, add a shortcut on Windows Desktop, link to Xming with the following parameter:

(Xming default font is 96 dpi, increase it to the size you like)

"C:Program Files (x86)XmingXming.exe" :0 -clipboard -multiwindow -ac -dpi 108

To check additional usage:

"C:Program Files (x86)XmingXming.exe" -h

Continue reading My Ubuntu X Forwarding Settings

Windows 8.1 Event 10016 Fix: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {D63B10C5-BB46-4990-A94F-E40B9D520160}

A year ago, I had such error message in the event viewer on the first day of fresh installation of Windows 8. I believed it was also the reason that I had a blue screen: MEMORY_MANAGEMENT error. It was caused by ntoskrnl.exe upon inspecting Windows Mini Dump, by a tool named BlueScreenView.  Now a year later, after I recently updated to Windows 8.1 Update 1, the problem came back again. I decide to log it here.

After inspecting Windows Event Viewer, the error is the same as before, which is:

Event 10016, DistributedCOM

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
to the user NT AUTHORITYSYSTEM SID (S-1-5-18) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

Here is a way I found to fix it:

1.Go to Component Service: dcomcnfg  (in Windows 8.1, you may hit ‘Win’ + Q and enter dcomcnfg, and launch it by Admin)

At the left panel, go to ‘Component Service->Computers->My Computer->DCOM Config’, then at the right panel, find by name: ‘RunTimeBroker’ (This is {D63B10C5-BB46-4990-A94F-E40B9D520160})

Right click it, choose ‘Property’ -> ‘Security’.   Then I found everything was grey and unable to edit.

2. To enable editing ‘Security’, launch regedit (‘Win’ + Q and enter regedit, open the application by Admin)

Browse to Hkey_classes_rootAppID{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}, Right click it

Choose ‘Permissions’, -> Choose ‘Advanced‘ -> Change Owner to ‘Administrators’ of your PC -> Apply the change

Then change ‘SYSTEM’ and ‘Administrators’ ‘s permission to ‘Full Control’ under ‘Permission’ -> Apply the change

3. Go back to Component Service dcomcnfg

Now the Security section is able to edit.

In ‘Launch and Activation Permissions’, Add ‘SYSTEM’ and give it permission ‘Full Control’

4. DONE!

Continue reading Windows 8.1 Event 10016 Fix: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {D63B10C5-BB46-4990-A94F-E40B9D520160}