时区更改date-Rtzselectrm-rf/etc/localtimeln-sf/usr/share/zoneinfo/Asia/Shanghai/etc/localtimevi/etc/sysconfig/clockZONE="Asia/Shanghai"========================NTP服务/etc/init.d/ntpdstartchkconfigntpdonchkconfig--listntpd
分类:
系统相关 时间:
2016-11-11 20:53:06
阅读次数:
176
find -exec 的标准写法 find ./ -name "*.tmp" -exec rm -rf "{}" \; find -exec 这个命令组合很好用,在find命令后加上 -exec,就可以把找出来的东西进行操作。 之前写过一篇Linux命令:find与exec参数的用法 #find . ...
分类:
其他好文 时间:
2016-11-10 11:37:04
阅读次数:
129
rm命令功能说明Linux中rm命令是删除文件和目录的。在使用-rf参数时,一定要注意,因为该目录和文件都会被删除,删除一个目录中的一个或多个文件或目录,如果没有使用-r选项,则rm不会删除目录。如果使用rm来删除文件,通常仍可以将该文件恢复原状。用法如下:rm[选项]文件…主..
分类:
系统相关 时间:
2016-11-09 23:10:01
阅读次数:
225
##################################################################################################### #find ... -exec rm {} \; 可以把find命令查找到的结果删除,其区别简单 ...
分类:
其他好文 时间:
2016-11-08 01:23:26
阅读次数:
219
一.故障现象:[root@c1node01~]#servicenetworkrestartShuttingdownloopbackinsterface:[OK]Bringinguploopbackinsterface:[OK]Bringingupinterfaceeth0:Deviceeth0doesnotseemtobepresent,delayinginitialization.[FAILED]解决办法:[root@c1node01~]#rm-rf/etc/udev/rules.d/..
分类:
其他好文 时间:
2016-11-07 02:55:32
阅读次数:
149
批量自动删除rpm包:rpm -qa | grep mysql | while read c; do rpm -e $c --nodeps; done minimal最小化安装eth0默认没有自启用修改配置文件onboot=true 修改静态地址后发现无法ping外网需要设置网关route add ...
分类:
系统相关 时间:
2016-11-02 23:32:17
阅读次数:
265
查询网段可用ip脚本#!/bin/bashrm-rf/log/ip.txtforinumin`seq1253`doUn=`ping-c210.0.1.$inum|greploss|awk-F[:""]+‘{print$6}‘`if[$Un=‘100%‘];thenecho10.0.1.$inum>>/log/ip.txtfidone
分类:
其他好文 时间:
2016-11-02 21:08:47
阅读次数:
154
外层目录下makefile 里层目录下makefile ...
分类:
其他好文 时间:
2016-11-01 21:18:22
阅读次数:
189
在删除文件过多时,会出现Argumentlisttoolong的错误提示;出现该问题后,可以使用如下方式进行处理。简单汇总:使用xargs命令结合find使用find.-name"*"|xargsrm-rf‘*‘使用find-exec遍历,然后执行删除便可。find/tmp-typef-execrm{}\;上述方法中使用了xargs和find中的-exec;..
分类:
其他好文 时间:
2016-11-01 11:48:59
阅读次数:
128
通常情况下使用cp -rf进行文件或者文件夹的管理时一般就不再提醒是否覆盖。然而在内网的一台机器上使用cp -rf却提示是否覆盖。难道和常用的命令不同? [root@xxxx test]# cp -rf ./files/ ./bak/ cp:是否覆盖"./bak/files/test.txt"? c ...
分类:
系统相关 时间:
2016-10-30 09:23:40
阅读次数:
288