Chinaunix首页 | 论坛 | 博客
  • 博客访问: 209619
  • 博文数量: 11
  • 博客积分: 1411
  • 博客等级: 上尉
  • 技术积分: 680
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-25 22:09
文章分类

全部博文(11)

文章存档

2008年(11)

我的朋友

分类:

2008-08-25 23:28:00


#!/bin/bash

date=$1
mpoint=/mnt/temp
local=$mpoint/Data/$date
save=/export/tt/$date
mkdir -p $save/info
shlight //computer19/Array $mpoint -U administrator -P ""
cd $local
for unit in `ls $local |grep U`
do
 mkdir -p $save/$unit
 cd $local/$unit  
 mv *.ifo $save/info
 for sub in `ls |grep U`
 do
 cd $local/$unit/$sub
     for file in `ls `
     do
     echo $file
     cp $file $save/$unit
     done

  cd /
      sleep 1
      umount /$mpoint
      kill ` ps -ef|grep shlight|grep $1|awk '{printf $2"\n"}' `
      sleep 1
      shlight //computer19/Array $mpoint -U administrator -P ""
  done
 umount $mpoint
done




# Usage: ./cp.sh 20070614  /export/tt/20070614/

阅读(861) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~