摘要:
##################################################################################################### #find ... -exec rm {} \; 可以把find命令查找到的结果删除,简单的说是 阅读全文
posted @ 2016-11-07 23:18
reborn枪
阅读(11157)
评论(0)
推荐(1)
摘要:
运行级别: 0是关机 1是单用户模式 2不需要网络,不需要NFS(Network File System)的多用户模式 3是多用户模式,命令行模式 4是未使用的 5是图形桌面 6是重启 runlevel 查看系统当前的运行级别 init+数字 切换运行级别 特殊字符含义: ~是家目录/root -用 阅读全文
posted @ 2016-11-07 23:07
reborn枪
阅读(277)
评论(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枪
阅读(832)
评论(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枪
阅读(262)
评论(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枪
阅读(1688)
评论(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枪
阅读(2276)
评论(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枪
阅读(1887)
评论(0)
推荐(0)
摘要:
DML 只是对表内部的数据操作,不涉及表的定义,结构的修改。主要包括(insert)(update)(delete)(select)删除数据库、表:drop database dbnamedrop table tablename / alter table tablename drop colum 阅读全文
posted @ 2016-11-07 18:46
reborn枪
阅读(1566)
评论(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枪
阅读(1481)
评论(0)
推荐(0)

浙公网安备 33010602011771号