Packages-Softwares

1. sougo/chrome等deb安装包

  • 问题:在ubuntu早期版本中,直接双击deb文件就能安装。但是在ubuntu 16.04后,用户个人下载的deb都不能直接双击安装。

  • 解决方法:安装GDebi软件后,直接在终端内安装。

  • GDebi安装:

    sudo apt-get update
    sudo apt-get install gdebi
    

    例如:安装搜狗输入法,我们在终端先进入到相应deb的文件夹后 sudo gdebi sogoupinyin.deb 在弹出选择,输入Y

    2. writing tools

    1. zotero. 通过添加 ppa的方式下载,方便后期软件更新:
      sudo apt-add-repository ppa:smathot/cogscinl  #Say yes/press enter to accept any requests.
      sudo apt-get update #wait for it to complete, then:
      sudo apt-get install zotero-standalone
      

      This will install the program.

    2. office

3. 科学上网

  1. 安装shadowsocks。ubuntu下有多种版本:命令行版本和qt版的shadowsock。新手推荐qt版。参考http://www.cnblogs.com/cursorhu/p/7157257.html
  2. chrome配置switchomega

4. teamviewer

  1. 安装比较简单,在官网下载deb安装包,使用dpkg命令安装: sudo dpkg -i teamviewer_12.0.85001_i386.deb sudo apt-get install -f -y
  2. In order to use TeamViewer on Linux, the TeamViewer remote control daemon must be running. You can check out its status by executing the command below. systemctl status teamviewerd You can manually start the daemon with: sudo systemctl start teamviewerd
    And enable autostart at boot time with: sudo systemctl enable teamviewerd TeamViewer is installed under /opt/teamviewer directory. If you take a look at this directory, you can find that TeamViewer for Linux is actually a Wine package based on its Windows version. Wine is a program which allows running Microsoft Windows programs on Unix
  3. 有时候显示no connection, 使用以下命令重启teamviewer服务:
    sudo service teamviewerd restart

Commands

文本搜索工具grep

grep usage

  • 常用选项与参数:
    -a :将 binary 文件以 text 文件的方式搜寻数据
    -c :统计找到 ‘搜寻字符串’ 的次数(count)
    -i :忽略大小写的不同,所以大小写视为相同
    -l :列出文件内容符合指定的范本样式的文件名称
    -L :列出文件内容不符合指定的范本样式的文件名称
    -n :输出行号(number)
    -r :搜索文件夹而非文件(默认搜索文件) -v :反向选择,亦即显示出没有 ‘搜寻字符串’ 内容的那一行!
    –color=auto :可以将找到的关键词部分加上颜色的显示喔!

  • Demo

    • 例如,有多个被试文件夹,sub01-sub90. 每个被试文件夹下有一个名为“output.subname”的binary文件。其中有一行输出为TSNR的值。
    • 目的:得到每个被试的TSNR值。
    • 方法:xargs配合grep查找 find -type f -name 'output*'|xargs grep "TSNR average" 命令解读,在当前目录下,找到文件(f=file)名(name)为‘output’开头的文件,把搜索到的结果传递给(传递命令xargs)grep命令。grep在上一个的结果中,搜索包括“TSNR”字符串的行。
    • 可以进一步把得到的结果保存为一个文档,参考 http://blog.csdn.net/tengh/article/details/41823883 例如: find -type f -name 'output*'|xargs grep "TSNR average"|tee TSNR.txt

参考资料

  • https://www.zhihu.com/question/19811112
  • https://www.cnblogs.com/wangkongming/p/4476933.html
  • 通配符和正则表达式 http://blog.csdn.net/drdairen/article/details/51271370