上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 78 下一页
摘要: ifconfig eth0 ip 更改IP 网关可以用 route命令查看修改添加网关route add default gw 网关地址 删除网关route del default gw 网关地址用这两个命令改`只能保证在电脑开着的时候用` 而且你一重新启动 这俩地址就会还原到以前的`不想还原可以改配置文件网关IP都在 /etc/sysconfig/network-scripts/ifcfg-eth0 这个文件里改 可以永久保存 DNS是在/etc/resolv.conf 这个配置文件里修改 修改后也是永久保存 阅读全文
posted @ 2012-08-27 14:37 ahuo 阅读(278) 评论(0) 推荐(0)
摘要: sudo apt-get install nfs-kernel-server $sudo gedit /etc/exports /home/ *(rw,sync,no_root_squash) /home 192.168.3.0/24(rw,sync,no_root_squash,no_subtre 阅读全文
posted @ 2012-08-27 14:31 ahuo 阅读(190) 评论(0) 推荐(0)
摘要: gdbserverUsage: gdbserver [OPTIONS] COMM PROG [ARGS ...] gdbserver [OPTIONS] --attach COMM PID gdbserver [OPTIONS] --multi COMMCOMM may either be a tty device (for serial debugging), orHOST:PORT to listen for a TCP connection.gdbserver 127.0.0.1:1234gdbtarget remote127.0.0.1:1234 阅读全文
posted @ 2012-08-27 10:59 ahuo 阅读(384) 评论(0) 推荐(0)
摘要: gdb和arm-elf-gdb只是针对的目标平台不一样gdb 是This GDB was configured as "i686-pc-linux-gnu" 本机平台arm-elf-gdb 是This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf". 目标平台是 arm-elf的编译命令./configure --target=arm-elfmake 阅读全文
posted @ 2012-08-27 10:39 ahuo 阅读(829) 评论(0) 推荐(0)
摘要: error: ignoring return value of是一个警告来的,意思是忽略的返回值,因为打开了-Werror编译选项,就会把警告当错误处理解决办法:WERROR_CFLAGS = #-Werror或者试一下./configure--disable-werror 阅读全文
posted @ 2012-08-27 10:36 ahuo 阅读(1965) 评论(0) 推荐(0)
摘要: 假设有变量 var= http://www.ahuo.com/test.htm一 # 号截取,删除左边字符,保留右边字符。echo ${var#*//}其中 var 是变量名,# 号是运算符,*// 表示从左边开始删除第一个 // 号及左边的所有字符即删除 http://结果是 :www.ahuo.com/test.htm二 ## 号截取,删除左边字符,保留右边字符。echo ${var##*/}##*/ 表示从左边开始删除最后(最右边)一个 / 号及左边的所有字符即删除 http://www.ahuo.com/ 结果是 test.htm三 %号截取,删除右边字符,保留左边字符echo ... 阅读全文
posted @ 2012-08-24 18:33 ahuo 阅读(590) 评论(0) 推荐(0)
摘要: flock -x ./lock dd 结束前flock -x ./lock ls 会一直等待也有对应的apiflockint flock(int fd, int operation); 阅读全文
posted @ 2012-08-24 17:22 ahuo 阅读(249) 评论(0) 推荐(0)
摘要: 为了满足这样的需求:记录文件变化、记录用户对文件的读写,甚至记录系统调用,文件变化通知。本文介绍audit和inotify.什么是auditThe Linux Audit Subsystem is a system to Collectinformation regarding events occurring on the system(s)Kernel events (syscall events)User events (audit-enabled programs)syslog会记录系统状态(硬件警告、软件的log), 但syslog属于应用层, log归咎与软件, 并不会记录所有动作 阅读全文
posted @ 2012-08-24 11:31 ahuo 阅读(6261) 评论(1) 推荐(0)
摘要: 用 #defines 和 bit masks 操作。这是一个有极高可移植性#define BIT3 (0x1 << 3)static int a;void set_bit3(void){ //a = 0001a |= BIT3; // a = 1001}void clear_bit3(void){//~(1<<1)= 1111111111111101// ~(1<<2)= 1111111111111011a &= ~BIT3;} 阅读全文
posted @ 2012-08-23 15:19 ahuo 阅读(282) 评论(0) 推荐(0)
摘要: arm-elf-gcc -o test_e test.c -elf2fltBFLT executable - version 4 ramelf[exective linked file]: 一种为Linux系统所采用的通用文件格式,支持动态链接和重定位。 flat:扁平格式。elf文件有很大的头文件,flat格式对文件头和一些段信息做了简化,可执行程序小,适于嵌入式系统。elf2flt就是将elf格式转换为flt格式。arm-linux-gcc -o test_l test.cELF 32-bit LSB executable, ARM, version 1, dynamically link 阅读全文
posted @ 2012-08-22 22:43 ahuo 阅读(856) 评论(0) 推荐(0)
摘要: indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 阅读全文
posted @ 2012-08-22 16:58 ahuo 阅读(191) 评论(0) 推荐(0)
摘要: :helphelptags:helptaglist.txt使用下面的命令生成帮助标签:helptags~/.vim/doc下面介绍常用的taglist配置选项,你可以根据自己的习惯进行配置:- Tlist_Ctags_Cmd选项用于指定你的Exuberant ctags程序的位置,如果它没在你PATH变量所定义的路径中,需要使用此选项设置一下;-如果你不想同时显示多个文件中的tag,设置Tlist_Show_One_File为1。缺省为显示多个文件中的tag;-设置Tlist_Sort_Type为”name”可以使taglist以tag名字进行排序,缺省是按tag在文件中出现的顺序进行排序。按 阅读全文
posted @ 2012-08-22 11:48 ahuo 阅读(476) 评论(1) 推荐(0)
摘要: gdb是個命令列模式的交談(interactive)除錯器, 跟telnet或其它的unix交談式程式一樣有個提示符號,然後要下命令 (gdb)COMMAND 不要忘了gcc編譯時要加 -g 參數, 基本gdb命令 檔案處理 ======== file a.out 載入可執行檔a.out path 告訴gdb obj code在那 directory 告訴gdb source code在那裡 SHELL ===== shell ls 就會執行ls了 cd xxx 不過用shell的方法跟Makefile一樣... 阅读全文
posted @ 2012-08-20 10:54 ahuo 阅读(531) 评论(0) 推荐(0)
摘要: 设置时间为下午14点36分。# date -s 14:36:00Fri Nov 26 14:15:00 CST 1999设置时间为2012年11月28号。# date -s 20121128加8小时# date -s "8 hours" 阅读全文
posted @ 2012-08-20 10:03 ahuo 阅读(447) 评论(0) 推荐(0)
摘要: 1. 安装ntpdate工具 # sudo apt-get install ntpdate 2. 设置系统时间与网络时间同步 # ntpdate cn.pool.ntp.org 阅读全文
posted @ 2012-08-19 20:59 ahuo 阅读(281) 评论(0) 推荐(0)
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 78 下一页