Saturday, February 13, 2016

file size


  1. individual file size : ls -lh file
  2. free and used place on the disk : df  -h
  3. total folder size : du -hs

DNS configure


  1. all mappings are in hosts: /etc/hosts
  2. google public dns
  3. clients need to be able to connect to local nameserver

Thursday, February 11, 2016

using sublime text2 as latex editor on ubuntu


  1. install sublime text2 
  2. install package control via sublime console (ctrl + `)
    • import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
  3. install latextools : 
    • CTRL + SHIFT + P
    • install package ..
    • install latextools ...
  4. install tex : sudo apt-get install texlive latexmk

vim configure

  3 set nu
  4 set autoindent
  5 set ruler
  6 syntax on
  7 set nocompatible
  8 filetype indent plugin on
  9 set hlsearch
 10 set softtabstop=4
 11 set shiftwidth=4
 12 set expandtab
 13 set autoindent
 14 set ruler

Tuesday, February 9, 2016

档案权限与管理

install and configure ns3 on ubuntu


  1. wiki: install ns3
    • download ns3 tar
    • install pre requirements: sudo apt-get install
      gcc g++ python python-dev qt4-dev-tools libqt4-dev mercurial bzr cmake libc6-dev 
      libc6-dev-i386 g++-multilib gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison 
      libfl-dev tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 
      libgtk2.0-dev vtun lxc uncrustify doxygen graphviz imagemagick texlive 
      texlive-extra-utils texlive-latex-extra texlive-font-utils dvipng python-sphinx dia 
      python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev libboost-signals-dev 
      libboost-filesystem-dev openmpi-bin openmpi-common openmpi-doc libopenmpi-dev

install ubuntu using virtualbox in mac

  1. install virtualbox on mac 
  2. download ubuntu iso 
  3. install ubuntu on virtualbox
  4. make ubuntu window full screen : 
    • start ubuntu
    • Home+F make the virtualbox full screen
    • find devices menu on the left top, and then choose "install guest addition"
  5. finish.

Full Screen:
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install dkms
  • sudo apt-get install build-essential
  • install guest additioin on the devices menu