In article <slrncflt97.ff3.BitTwister@wb.home.invalid>
Bit Twister <BitTwister@localhost.localdomain> wrote:
>On Sun, 18 Jul 2004 15:00:10 -0700, Adam wrote:
>> I would like to run a small script from Cron, to monitor certain file
>> size and then take an action.
>>
>> Something like
>>
>> $Filename=
>> $Filepath=
>>
>> $size=
>>
>> If $size= {certain size}
>>
>> Action here.
>>
>> I have no idea how to capture a file size in bash, any suggestions?
>
>stat -c %s /etc/profile
>
>> I read somewhere that we can use ls -s, but how to capture that in the
>> script I have no idea.
>
>All sorts of ways, for instance
>
>set $(ls -s /etc/profile)
>echo size is $1 name is $2
>
>You do need to take time to play around here
>http://www.tldp.org/LDP/abs/html/index.html
Thank you for the pointers.