摘要: [root@localhost ~]# cat /etc/redhat-releaseCentOS release 6.8 (Final) [root@localhost ~]# uname -r2.6.32-642.el6.x86_64 ############################## 阅读全文
posted @ 2016-11-09 01:21 reborn枪 阅读(103) 评论(0) 推荐(0)
摘要: ##################################################################################################### #find ... -exec rm {} \; 可以把find命令查找到的结果删除,简单的说是 阅读全文
posted @ 2016-11-07 23:18 reborn枪 阅读(11100) 评论(0) 推荐(1)
摘要: 运行级别: 0是关机 1是单用户模式 2不需要网络,不需要NFS(Network File System)的多用户模式 3是多用户模式,命令行模式 4是未使用的 5是图形桌面 6是重启 runlevel 查看系统当前的运行级别 init+数字 切换运行级别 特殊字符含义: ~是家目录/root -用 阅读全文
posted @ 2016-11-07 23:07 reborn枪 阅读(267) 评论(0) 推荐(0)
摘要: 查找/xusx下所有7天以前的log结尾并且大于10k的文件移动到/tmp 第一步 [root@localhost xusx]# find ./ -type f -name "*.log" -mtime +7 -size +1k ./d.log./passwd.log 查看时间: [root@loc 阅读全文
posted @ 2016-11-07 23:01 reborn枪 阅读(808) 评论(0) 推荐(0)
摘要: 1、替换文本内容name为name2 [root@localhost a]# touch 1.txt 2.txt 3.txt[root@localhost a]# echo "ni hao">1.txt[root@localhost a]# echo "ni hao">2.txt[root@loca 阅读全文
posted @ 2016-11-07 19:58 reborn枪 阅读(236) 评论(0) 推荐(0)
摘要: 1、三种方法打印/etc/passwd文件中2-5行 第一种: [root@localhost xusx]# head -5 passwd|tail -4 第二种: [root@localhost xusx]# sed -n '2,5p' passwd 第三种: [root@localhost xu 阅读全文
posted @ 2016-11-07 19:44 reborn枪 阅读(1666) 评论(0) 推荐(0)
摘要: 1、使用rm命令时提示Do not use rm command alias rm='echo Do not use rm command' 使rm提示生效 /etc/profile。 . /etc/profile或者 source /etc/profile vim /etc/profile(先执行 阅读全文
posted @ 2016-11-07 19:33 reborn枪 阅读(2253) 评论(0) 推荐(0)
摘要: 1、先找到要做实验的文件cp。 cp /etc/passwd /tmp/xusx 2、使用awk取passwd10-20的第三列从定向输出test.txt 第一步 awk 'NR>=10 && NR<=20' /tmp/xusx/passwd >>/tmp/xusx/test.txt 第二步 roo 阅读全文
posted @ 2016-11-07 19:13 reborn枪 阅读(1863) 评论(0) 推荐(0)
摘要: DML 只是对表内部的数据操作,不涉及表的定义,结构的修改。主要包括(insert)(update)(delete)(select)删除数据库、表:drop database dbnamedrop table tablename / alter table tablename drop colum 阅读全文
posted @ 2016-11-07 18:46 reborn枪 阅读(1558) 评论(0) 推荐(0)
摘要: 1、创建/data/xusx目录。 [root@localhost ~]# mkdir -p /data/xusx 2、创建文件。 [root@localhost xusx]# touch xusx.txt 3、文件写入内容 [root@localhost xusx]# cat >>xusx.txt 阅读全文
posted @ 2016-11-07 18:42 reborn枪 阅读(1479) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示