1. Linux下与时间有关的结构体
struct timeval
{
int tv_sec;
int tv_usec;
};
其中tv_sec是由凌晨开始算起的秒数,tv_usec则是微秒(10E-6 second)。
struct timezone
{
int tv_minuteswest;
int tv_dsttime;
};
tv_minuteswest是格林威治时间往西方的时差,tv_dsttime则是时间的修正方式。
&nbs ......
1) 工具说明
在SecureCRT这样的ssh登录软件里, 通过在Linux界面里输入rz/sz命令来上传/下载文件. 对于RHEL5, rz/sz默认没有安装所以需要手工安装.
sz: 将选定的文件发送(send)到本地机器;
rz:运行该命令会弹出一个文件选择窗口, 从本地选择文件上传到服务器(receive).
下载安装包lrzsz-0.12.20.tar.gz: http://www.ohse.de/uwe/software/lrzsz.html
2) 软件安装
首先通过sftp工具把安装文件上传到/tmp目录下.
# cd /tmp
# tar zxvf lrzsz-0.12.20.tar.gz && cd lrzsz-0.12.20
# ./configure && make && make install
上面安装过程默认把lsz和lrz安装到了/usr/local/bin/目录下, 下面创建软链接, 并命名为rz/sz:
# cd /usr/bin
# ln -s /usr/local/bin/lrz rz
# ln -s /usr/local/bin/lsz sz
3) 使用说明
打开SecureCRT软件 -> Options -> session options -> X/Y/Zmodem 下可以设置上传和下载的目录; 然后在用SecureCRT登陆linux终端的时候:
# sz filename (发送文件到客户端,zmodem接收可以自行启动)
# rz (从客户端上传文件到linux服务端)
:) ......
1) Linux中主要有哪几种内核锁?
2) Linux中的用户模式和内核模式是什么含意?
3) 怎样申请大块内核内存?
4) 用户进程间通信主要哪几种方式?
5) 通过伙伴系统申请内核内存的函数有哪些?
6) 通过slab分配器申请内核内存的函数有?
7) Linux的内核空间和用户空间是如何划分的(以32位系统为例)?
8) vmalloc()申请的内存有什么特点?
9) 用户程序使用malloc()申请到的内存空间在什么范围?
10) 在支持并使能MMU的系统中,Linux内核和用户程序分别运行在物理地址模式还是虚拟地址模式?
11) ARM处理器是通过几级也表进行存储空间映射的?
12) Linux是通过什么组件来实现支持多种文件系通的?
13) Linux虚拟文件系统的关键数据结构有哪些?(至少写出四个)
14) 对文件或设备的操作函数保存在那个数据结构中 ......
参见:http://isis.poly.edu/kulesh/stuff/src/klist/
Introduction:
Linux kernel is mostly written in the C language. Unlike many other languages C does not have
a good collection of data structures built into it or supported by a collection of standard libraries.
Therefore, you're probably excited to hear that you can borrow a good implementation of a
circularly-linked list in C from the Linux kernel source tree.
The file include/linux/list.h
in the source tree implements a type oblivious, easy-to-use, circularly-linked list in the C
language. The implementation is efficient and portable-- otherwise it would not have made it
into the kernel. Whenever someone needs a list in the Linux kernel they rely on this
implementation to strung up any data structure they have. With very little modifications
(removing hardware prefetching of list items) we can also use this list in our applications.
A usable version of this file is available
here for download
.
Some of the advant ......
在找GTK的开发文档,发现在 /usr/share/doc/libgtk2.0-doc/里有个 tutorial的目录,里边有个gtk-tutorial.devhelp的文件,于是试试有没有devhelp这个工具,原来真的有,而且已经安装过了!
于是用它来打开这个开发文档,非常好用。而且里边还有其他库的帮助文档呢! ......
通过编辑linux的/etc/bash.bashrc文件来快速定位各个目录
alias mysqlw="mysql -uroot -p123456"
alias usr="cd /usr/local"
alias src="cd /usr/src"
alias sphinx="cd /usr/local/sphinx"
alias apahce="cd /usr/local/apache"
alias home="cd /home/data/dev_test_com"
alias php="/usr/local/php5/bin/php" ......