usermod command
the default path of the command is /usr/sbin
add one user to one group:
here use the option '-a'
from the manul
-a, --append append the user to the supplemental GROUPS
mentioned by the -G option without removing
him/her from other groups
/usr/sbin/usermod -a -G group1 user_name
remove one user from one group, you have to move that user to another group:
/usr/sbin/usermod -G group2 user_name
Monday, 27 February 2012
Thursday, 29 September 2011
Ubuntu 11.04 natty 下安装 qq for linux 失败
终于闲了下,准备在我的PC上安装个QQ。结果失败:
dpkg: error processing linuxqq_v1.0.2-beta1_i386.deb (--install):
parsing file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'linuxqq':
error in Version string 'v1.0.2-beta1': version number does not start with digit
Errors were encountered while processing:
linuxqq_v1.0.2-beta1_i386.deb
于是google下找到了答案:
dpkg: error processing linuxqq_v1.0.2-beta1_i386.deb (--install):
parsing file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'linuxqq':
error in Version string 'v1.0.2-beta1': version number does not start with digit
Errors were encountered while processing:
linuxqq_v1.0.2-beta1_i386.deb
于是google下找到了答案:
原版LinuxQQ下载地址: http://im.qq.com/qq/linux/download.shtml
忍不住抱怨下,腾讯,难道你就没有linux工程师了?
Monday, 16 May 2011
How to read the source code
Some workmates talked about how to read the source this afternoon. I found that I don't know how to read the source exactly.
In my opninion, read source is to know everything of the source. Such as: how a fuction works, why a variable plus one, how to implement an algorithm, and so on. So when I read a source, I chose a part to begin, and from that part, I went into the code as deeply as I could. It took me a lot of time, and also very difficult, but I got a little. Even several days later, I forgot everything totaly.
I found the following words about how to read source code:
1. It's boring and hard, so must carry on.
2. If it's really too difficult, read some related books or documents first. It helps you to know the source code better.
3. Write down your thinking after reading the source. It's very easy to forget what you get from the source.
4. Know the priority of every parts. first need, first study.
5. Know the importance of every parts. some parts need to know the details, while other only need to know the functions.
In my opninion, read source is to know everything of the source. Such as: how a fuction works, why a variable plus one, how to implement an algorithm, and so on. So when I read a source, I chose a part to begin, and from that part, I went into the code as deeply as I could. It took me a lot of time, and also very difficult, but I got a little. Even several days later, I forgot everything totaly.
I found the following words about how to read source code:
1. It's boring and hard, so must carry on.
2. If it's really too difficult, read some related books or documents first. It helps you to know the source code better.
3. Write down your thinking after reading the source. It's very easy to forget what you get from the source.
4. Know the priority of every parts. first need, first study.
5. Know the importance of every parts. some parts need to know the details, while other only need to know the functions.
Subscribe to:
Comments (Atom)