Some Linux shell

tarzcvf20090918.tar.gz./xxxx

tarzxvf20090918.tar.gz

#!/bin/sh

delete_dir=/home/tkapplications/MarketDataAdapter/V1_0/PRISMDataCheck/flag_files

find$delete_dir-maxdepth1-mtime+7-name"*.*"-exec/bin/rm-f{}\;>/dev/null

cd`dirname$0`/..

ROOT_DIR=`pwd`

cd`dirname$0`

#!/usr/bin/ksh

#@(#)$Id:stopapacheserver

#Killstheapacheserverd:stopServer

#pshasdifferentoptionsunderLinux

OS=`/bin/uname`

if["$OS"="Linux"];then

PS_CMD="/bin/ps-efww"

else

PS_CMD="/usr/ucb/ps-auxwww"

fi

#findprocessesapachehttpd

jpid=`$PS_CMD|grep"httpd"|grep-vgrep|awk'{print$2}'`

if[-z"$jpid"];then

echo"Can'tfindapacherunServer"

exit

fi

echo"sleep10second"

sleep10

echo"Killing$jpid"

kill-9$jpid

exit0

相关推荐