发布时间:2013-10-30 10:15:03
脚本如下#!/bin/bashfor u in `awk -F: '{print $1}' /etc/passwd`; do if [[ -d "/home/$u" ]]; then if [[ -r "/home/$u/.bash_history" ]]; then cat /home/$u/.bash_history > /tmp/$u.txtt fi&.........【阅读全文】
发布时间:2013-08-19 18:20:33
通过ps -Af|grep openfire 能够得到openfire进程的进程号(openfire没有stop的shell,真是蹩脚)而在shell 脚本里很难通过 ps -Af|grep openfire 得到正在运行的openfire进程号,在网上找了好久也没有发现有一个好的办法,仔细想想在每次启动openfire时可以得进程号,然后把进程号写入一个文件中,当想要kill掉openfire进.........【阅读全文】
发布时间:2013-08-17 20:38:49
1.用s///替换[root@oa1 home]# cat test1 #!/usr/bin/perl$_ = "He's out bowling with Barney tonight.";s/Barney/Fred/;print "$_\n";[root@oa1 home]# ./test1 He's out bowling with Fred tonight.2.用$1替换变量[root@oa1 home]# cat test2 #!/usr/bin/perl$_ = "He's out bowling with B.........【阅读全文】
发布时间:2013-06-13 09:50:49
脚本功能:定时备份oracle数据库,上传到指定服务器,删除时间超过14天的备份文件。#=========================================================================# Purpose:exp Oracle DB orcl to file orcl_YYYYMMDDHHMM.dmp,# and Delete the file,30 days ago created # Author :.........【阅读全文】