Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

File monitor (See related posts)

I was constantly needing to see real time file stats so I wrote this little script to help me out...

Usage:
filemon FILE

FILE is the file you want to monitor.

#!/bin/bash

# File Monitor  btodd3
#
# 3/14/07	Initial Version

function list () {
ls -l
sleep 1
}

while true; do
list | grep $1
done

Comments on this post

masterkain posts on Apr 07, 2007 at 00:13
watch -n 1 "ls -l"
btodd3 posts on Apr 07, 2007 at 06:44
cool!

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts