Chinaunix首页 | 论坛 | 博客
  • 博客访问: 116246
  • 博文数量: 84
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 0
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-17 12:39
个人简介

大连Linux/Unix高端就业、认证培训的领导者。

文章分类

全部博文(84)

文章存档

2013年(25)

2012年(1)

2010年(4)

2009年(9)

2008年(14)

2007年(4)

2006年(27)

分类: LINUX

2013-03-18 10:16:36

如题:并且要统计出来变化了多少字节。提示,我们可以用find /home  -type f命令,列出所有文件。将这些输出当做参数,用ls -al处理。然后按照你的思路去解决这个问题。
阅读(1337) | 评论(6) | 转发(2) |
0

上一篇:四则运算举例

下一篇:udev规则

给主人留下些什么吧!~~

shirendelove2013-03-18 21:04:57

shirendelove:if ! [ $tmp -eq 0 ]
        then
             if [ $tmp -gt 0 ]
             then
                  echo -e "\033[33m $name is increase

第一次运行记录文件信息
第二次运行可比对文件变化

第一个参数 为要统计的目录
第二个参数为 记录文件的存放目录


新手写程序。。。大神不要喷


王逍

回复 | 举报

shirendelove2013-03-18 20:58:34

shirendelove:#!/bin/bash

if ! [ $# -eq 2 ]
then
     echo "The arg's count is wrong!"
     exit -1
fi

cd $1;src=`pwd`;cd - > /dev/null
cd $2;des=`pwd`;cd - > /dev/null

filename=Checkfile.tmp

######   begin check  #######
if ! [ 

if ! [ $tmp -eq 0 ]
        then
             if [ $tmp -gt 0 ]
             then
                  echo -e "\033[33m $name is increase

回复 | 举报

shirendelove2013-03-18 20:58:15

#!/bin/bash

if ! [ $# -eq 2 ]
then
     echo "The arg's count is wrong!"
     exit -1
fi

cd $1;src=`pwd`;cd - > /dev/null
cd $2;des=`pwd`;cd - > /dev/null

filename=Checkfile.tmp

######   begin check  #######
if ! [ 

有点微嗨皮2013-03-18 20:51:54

坑爹了,显示不全,下载看吧 = =

http://www.eleas.cn/download/findsize.sh

没毒,我自己的网站

有点微嗨皮2013-03-18 20:46:45

接上楼~ 粘贴到一起看吧

echo "At $(date +%r), the SIZE of $DIR_PATH is $DIR_SIZE B"

if [ "$(wc -l < $DIR_TEMNAME)" -lt "2" ]; then
 echo "This is your first time to compare a DIR, size compare will start at next time."