The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to log DNS activity? mbak AIX 3 02-13-2008 11:39 AM
activity on a file Terrible Shell Programming and Scripting 2 08-13-2006 05:10 PM
Disk activity tovohery AIX 3 08-01-2006 06:21 AM
logging users activity dozy UNIX for Dummies Questions & Answers 6 12-28-2004 06:20 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-26-2003
Registered User
 

Join Date: Oct 2001
Posts: 9
monitoring /tmp and /var/tmp for suspicous activity

Hello,

does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present?

Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening
Forum Sponsor
  #2 (permalink)  
Old 12-26-2003
Registered User
 

Join Date: Dec 2003
Location: India
Posts: 50
I could think of this simple method

i=`ls -1 /tmp /var/tmp | wc -l`

while [ true ]
do
sleep 1
j=`ls -1 /tmp /var/tmp | wc -l`
if [ $j -gt $i ]
then
echo "A new file has been created"
exit 1
fi
done


Regards
JK
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0