![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
文章平均质量分 75
candj
这个作者很懒,什么都没留下…
展开
-
ubuntu固定IP地址
ubuntu固定IP地址编辑/etc/network/interfaces文件将:auto eth0iface eth0 inet dhcp改为:auto eth0iface eth0 inet staticaddress 你要设定的ip地址netmask 网关通过命令ifconfig可以查看到gateway 掩码通过命令route -n可以查看到重新连线:$sudo /etc/init.d/ne原创 2008-12-11 14:42:00 · 979 阅读 · 0 评论 -
Linux命令
查看文件编码file -bi yourfile.htmVim打开文件后:set fileencoding原创 2010-09-14 14:51:00 · 899 阅读 · 0 评论 -
Emacs Vim 常用命令
Emacs 1 查找字符串C-s 然后输入你要查找的字符串C-s 查找下一个2 全局替换首先键入 M-x 命令进入编辑器的小缓冲区,然后键入 replace-string 命令,编辑器提示用户输入要查找的字符串及要替换的字符串。 replace-string 命令不能实现正则表达式的替换,如果要使用正则表达式,必须使用 repla原创 2009-12-21 13:15:00 · 1209 阅读 · 0 评论 -
[转]linux和unix下常用解压和压缩命令
From: http://blog.chinaunix.net/u/4536/showart_231709.html .tar解包: tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)---------------------------------------------.gz解压原创 2009-12-18 16:20:00 · 482 阅读 · 0 评论 -
递归遍历目录文件
Shell实现 1、find命令find dir.yahoo.com/ -name *.html | less 2、for加ifforeach_dir(){for file in $1/*doif [ -d $file ]; thenforeach_dir $fileelse#do something herefidone}原创 2009-11-01 16:08:00 · 524 阅读 · 0 评论 -
wget
From: http://jnote.cn/blog/shell/wget-download.html用wget下载东西,的确很方便,它会自动重连并断点续传。让人很放心。经常要下载一个网站或网站的某个目录。将wget命令放到这里备用:下载一个目录,例如网站的yourdirwget -U "Mozilla/转载 2009-11-01 14:36:00 · 518 阅读 · 0 评论 -
Shell命令
http://ss64.com/bash/ grep、sed、awk、perl等对正则表达式的支持的差别http://hi.baidu.com/afantihome/blog/item/c22f50a4a2b66df99152ee6e.htmlshell多进程“多进程”实现http://www.cnblogs.com/fly3q/archive原创 2009-11-01 22:54:00 · 922 阅读 · 0 评论 -
Linux at命令定时关机
From: http://www.pcstu.com/system/Linux/20090804/65873.htmlFrom: http://blog.csdn.net/xiaoming444/archive/2009/03/06/3963425.aspx 本文介绍下linux at命令的另一个作用:linux下使用linux at命令定时关机。 首先创建一个文件,写入:转载 2009-10-30 12:55:00 · 2326 阅读 · 0 评论 -
Ubunt修改源
方法一:System--->Administration--->"Software Sources"在"Ubuntu Software"标签下点击"Download from:"选择“Other...",在跳出窗口中选择"Select Best Server",测速完成后会自动标记最快的源这时选择"Chose Server"。 方法二:1、首先备份sources.lis原创 2009-10-21 09:43:00 · 527 阅读 · 0 评论 -
清空输出缓冲区
下面的代码动态刷新当前进度: #include #include using namespace std;int main(){ int i = 0; printf("Progress ... %2d",i); for(i = 0; i < 100; i++){ printf("/b/b"); printf("%2d",i); f原创 2009-10-19 22:48:00 · 1131 阅读 · 0 评论 -
nanosleep is better than sleep and usleep
From: http://cc.byexamples.com/20070525/nanosleep-is-better-than-sleep-and-usleep/ Don’t know whether you aware of the example code at Tap the interrupt signal, I am using sleep(1) within endless转载 2009-10-19 22:12:00 · 744 阅读 · 0 评论 -
Linux信号
From: http://cc.byexamples.com/20070520/tap-the-interrupt-signal/ When you hit control+c, you are actually send a SIGINT ( Interrupt signal ) to your program. By default, your program will be term转载 2009-10-19 21:50:00 · 539 阅读 · 0 评论 -
Ubuntu常用安装
Ubuntu常用安装 Python中的easy_install 安装小技巧Python中的easy_install安装小技巧2009-09-30 16:47Python中的easy_install工具很爽,它的作用类似于Php中的pear,或者Ruby中的gem,或者Perl中的cpan。如果想使用easy_install工具,可能需要先安装setuptools,不过更原创 2009-10-20 00:08:00 · 1344 阅读 · 0 评论 -
Awk
awk 内置变量1.ARGC 命令行参数个数 2.ARGV 命令行参数排列 3.ENVIROV 支持队列中系统环境变量的使用 4.FILENAME awk浏览的文件名 5.FNR 浏览文件的记录数 6.FS 设置输入域分隔符,等于命令行 -F选项 7.NF 浏览记录的域个数 8.原创 2010-09-27 18:11:00 · 780 阅读 · 0 评论