1 修改文件的用户和用户组

chgrp: change group的简写,修改文件所属的用户组。

chown :change owner的简写, 修改文件的所有者。

chown root:root aa.txt

2 网络代理的设置

公司网络,台式机,浏览器可以访问github,但是命令行不可以;开启电脑wifi后,浏览器不可以,命令行可以了。

有没有两种都可以的呢,可以通过设置git,不用ssh,而是https下载代码,如下

$ export HTTP_PROXY=http://ip:port
$ export HTTPS_PROXY=http://ip:port
$ gedit ~/.bashrc
$ git clone https://github.com/project.git


3 after install ubuntu, need sudo apt-get update, get update from /etc/apt/sources.list

need set this :

/etc/apt/apt.conf
Acquire::http::Proxy "http://proxy:prot";

then , success update.

4 安装搜狗输入法

从官网下载 deb,安装之后:

im-config

Click through and select fcitx. Click through.

Restart your computer. Click the keyboard in the top right corner. Press Configure Current Input Method. Press + to add a new language. De-select “Only show current language”. Type in sogou. Press OK. To switch between keyboards press Ctrl+Space


5 查找 某个目录下某种类型的文件中内容包含

 find /xxx -name "*" | xargs grep "某内容"


6 通过android stuido下载 emulator update时,总是失败。报出error:

Not enough space on /tmp


解决方案:tmp所提供的空间可能不够系统使用,需要增大空间。

To do 1: 
open a terminal and run
sudo umount -l /tmp
sudo mount -t tmpfs -o size=1048576,mode=1777 overflow /tmp

This should give you an 1MB partition (just like the one you had =P).
Now, to increase the size, you increase the size in that line, so that, with size=10485760, you'd get 10 MB.
Your goal is to find a number that is enough for the job, but leaves enough ram too

related link: https://askubuntu.com/questions/199565/not-enough-space-on-tmp