`
michael_paul
  • 浏览: 170622 次
  • 性别: Icon_minigender_1
  • 来自: 天津
社区版块
存档分类
最新评论

Some Linux shell

阅读更多
tar zcvf 20090918.tar.gz ./xxxx
tar zxvf 20090918.tar.gz


#!/bin/sh

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

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


cd `dirname $0`/..
ROOT_DIR=`pwd`


cd `dirname $0`


#!/usr/bin/ksh
# @(#)$Id: stop apache server
# Kills the apache serverd: stopServer

# ps has different options under Linux
OS=`/bin/uname`

if [ "$OS" = "Linux" ] ; then
  PS_CMD="/bin/ps -efww"
else
  PS_CMD="/usr/ucb/ps -auxwww"
fi

# find processes apache httpd
jpid=`$PS_CMD | grep "httpd" | grep -v grep | awk '{print $2}'`

if [ -z "$jpid" ] ; then
  echo "Can't find apache runServer"
  exit
fi

echo "sleep 10 second"
sleep 10

echo "Killing $jpid"

kill -9 $jpid

exit 0
分享到:
评论

相关推荐

    Linux Shell Scripting Cookbook.epub

    It guides you on implementing some of the most common commands in Linux with recipes that handle any of the operations or properties related with files like searching and mining inside a file with ...

    Linux Shell Scripting Cookbook.mobi

    It guides you on implementing some of the most common commands in Linux with recipes that handle any of the operations or properties related with files like searching and mining inside a file with ...

    Linux Shell Scripting Cookbook.pdf

    It guides you on implementing some of the most common commands in Linux with recipes that handle any of the operations or properties related with files like searching and mining inside a file with ...

    linux shell sed

    this materials include some common sed usage, I hope it's helpfull to you.

    A practical Guide to Linux Commands, Editors and Shell Programming

    experience, although some experience using a computer is helpful. It is appropriate for the following readers: • Students taking a class in which they use Linux or macOS • Power users who want to ...

    shell编程入门教程

    shell programming by showing some examples of shell programs. Its not help or manual for the shell. While reading this tutorial you can find manual quite useful ( type man bash at $ prompt to see ...

    linux shell中 if else以及大于、小于、等于逻辑表达式介绍

    then….else….fi[ -f “somefile” ] :判断是否是一个文件[ -x “/bin/ls” ] :判断/bin/ls是否存在并有可执行权限[ -n “$var” ] :判断$var变量是否有值[ “$a” = “$b” ] :判断$a和$b是否相等-r file ...

    linux bash手册(英文,version 4.2)

    linux平台的bash shell开发帮助文档(手册),英文版,版本4.2。日常开发shell翻阅, 章节如下: Definitions:: Some definitions used i n the rest of this manual. Basic Shell Features:: The shell "building ...

    shell高级编程实例(365例子)

    Shell脚本高级编程教程,希望对你有所帮助。 Example 10-23. Using continue N in an actual task: 1 # Albert Reiner gives an example of how to use "continue N": 2 # -------------------------------------...

    Windchill常用命令.docx

    1.在windchill shell中输入windchill -version,用来查看windchill的版本 2. xconfmanager -s name=value -t 目标文件 -p 用来在xconf和properties文件中增加条目,例如xconfmanager -s wt.servlet.ajp.minPort=...

    Linux Security Cookbook

    Here are some good reasons to read this book: l You need a quick reference for practical, security-related tasks. l You think your system is secure, but haven't done much to check or ensure this. ...

    Linux Shell脚本编程的注意事项

    此命令可以避免将脚本上传到远程服务器ssh user@host cat /path/to/remotefile | diff /path/to/localfile –#比较远程文件和本地文件的差异vim scp://username@host//path/to/somefile#vi一个远程文件curl ifconfig...

    Penetration Testing with the Bash shell

    This book teaches you to take your problem solving capabilities to the next level with the Bash shell, to assess network and application level security by leveraging the power of the command-line ...

    how_linux_works_2nd_edition

    Unlike some operating systems, Linux doesn’t try to hide the important bits from you-it gives you full control of your computer. But to truly master Linux, you need to understand its internals, like ...

    Linux 基础编程实验1

    实验目的: 1、 掌握基本编辑器使用。 2、 掌握LINUX shell脚本的编写与调试。 3、 掌握顺序结构、控制结构的脚本程序的编写。 4、 掌握简单的数组的程序编写

    LinuxBashShellScriptForOps:用于 Ops 和 Devops 的 Linux Bash Shell 脚本和 Python 脚本

    Linux Bash Shell Scripts For Ops, some python scripts here also. 这是一个怎样的项目 此项目是对在Linux运维工作所能用到的Shell脚本和Python脚本的归纳和总结。 大部分源码均出自生产系统并经过比较严谨的测试...

    当Shell程序退出时,获取PushBullet通知。-Linux开发

    pushblast当shell程序退出时,获取PushBullet通知。 用法pushblast“ some_command” pushblast将执行给定的命令,并通过PushBullet将通知推送到用户选择的设备pushblast。当shell程序退出时,获取PushBullet通知。 ...

    Robot Operating System for Absolute Beginners

    a good understanding of Linux shell commands; and Python and C++programming knowledge. This book discusses all the prerequisite technologies required for robot programming using ROS. This first ...

    [Linux.Bible][2005.Edition]

    can get going with some powerful server and programming features, if you care to. Part I assumes that someone has set up a Linux system in front of you and you want to start learning the basics of how...

    GNULinuxApplicationProgramming

    Some of the most useful GNU/Linux commands that you’ll encounter in programming on GNU/Linux are covered, and there is a tutorial on the Bourne-Again Shell (bash). Text processing is explored using ...

Global site tag (gtag.js) - Google Analytics