OneofthefilesthattheaverageUnixsysadminrarelylooksat,almostneverchangesandyetdependsoneverytimeheorsherebootsasystemisthe/etc/inittabfile.Thismodestlittlefilecontrolswhathappenswheneverasystemisrebootedorforcedtochangerunlevels.Let‘stakealookattheconfigurat..
分类:
系统相关 时间:
2014-05-13 04:47:00
阅读次数:
612
Linux优化基础优化--Centos5.864bit 1.添加一个普通用户 注:平时操作时尽量不用root useraddcysky passwdcysky<enter> newUnixpassword:20142014<enter> 或者:echo“12345..
分类:
其他好文 时间:
2014-05-13 04:35:40
阅读次数:
394
#!/usr/bin/envpythonimportsys,timefromsocketimportsocketdefread_interface(in_file):withfile(in_file)asf:returnf.readlines()[2:]defset_interface(inter_msg):dic={}foriinxrange(len(inter_msg)):dic[inter_msg[i].split(":")[0].strip()]={"in":inter_msg[i].split(":..
分类:
编程语言 时间:
2014-05-13 04:01:55
阅读次数:
432
Fromtimetotime,peoplewantmetocreateLINUXinitscriptsforthem.Iusuallyjusttakeanexistingoneforanotherserviceandchangeituptoworkformynewapplication,butmostofthemhavebecomesolongthesedaysthatIenduphavingtohackoutatonofcodejusttoreducethemdowntotheverybasicscript..
分类:
系统相关 时间:
2014-05-13 03:59:53
阅读次数:
306
#!/usr/bin/envpython#coding:utf8#此脚本为查找递归目录下所有文件匹配的内容importos,sys,tabdefpaths(path):list_path=os.walk(path)all_file=[]forp,d,flinlist_path:forfinfl:pfile=os.path.join(p,f)ifos.path.isdir(pfile):paths(pfile)all_file.append(pfile)returnall..
分类:
编程语言 时间:
2014-05-13 03:49:34
阅读次数:
426
#!/usr/bin/envpython#coding:utf8importos,sysimportmd5,tabfrommysql_co.my_dbimportset_mysqlfromssh_co.ssh_connectimportsshdfromssh_co.cfg.configimportssh_message,item_pathfromfileimportfindfiledefmy_mysql():db_file={}my_connect=set_mysql()f_file=findfile.mai..
分类:
编程语言 时间:
2014-05-13 01:44:22
阅读次数:
449
一、网卡1、Linux:网络属于内核的功能2、网卡定义:a)RHEL5网卡定义文件:/etc/modprobe.confb)RHEL6网卡定义文件:/etc/udev/rules.d/70-persistent-net.rules3、网卡命名:a)lo:本地回环b)以太网网卡:ethXc)点对点连接网卡:pppX4、网卡配置命令a)ifconfig[ethX]:显示网卡信..
分类:
系统相关 时间:
2014-05-13 01:13:33
阅读次数:
434
接着上一篇博文,原来双线程,现在为了实现暂停/继续功能,又加了一个线程。第三线程使用条件信号量,当用户按下S键,第三线程将检测到,并且将ifpause置为1,然后输出线程将在if语句成立后被条件信号量cond阻塞。此时第三线程依然运行。当检测到按下R后,ifpause置为0,并且使..
分类:
编程语言 时间:
2014-05-13 01:02:13
阅读次数:
507
linux系统的语言环境设置之浅见在linux的系统中经常碰到字符集导致的错误,下面总结了设置修改系统语言环境的方法。1.环境变量LANG用于设置系统的语言环境。当启动某些perl、php或其他编程的语言的程序文档时,其都会主动去分析环境变量LANG的数据,如果发现无法解析字符编码,..
分类:
系统相关 时间:
2014-05-13 01:00:08
阅读次数:
401
命令的学习:1.查看命令帮助的手段 Man命令名或者命令--help 常用看的12358 搜索引擎linux命令名2.涉及到的其他的技术点有:符号作用符号作用>输出重定向符.一个点当前目录>>..
分类:
其他好文 时间:
2014-05-13 00:51:53
阅读次数:
348