LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2003, 08:28 AM   #1
mdktechie
LQ Newbie
 
Registered: Sep 2003
Posts: 8

Rep: Reputation: 0
What to use for alerts?!


Hi All-

Here is the situation. I have a linux SSH server to which several companies send files to. I want to know when the files are there. Is there some way that I can set the server to monitor that folder and let me know when things are put there? I am also running a linux desktop if that helps any. Any suggestions??

TIA,
M
 
Old 10-30-2003, 11:49 AM   #2
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
I don't believe that sshd has an option like that, but
I came up with couple possible solutions.

1) Use dnotify to email you or IM you or do whatever when the directory
contents changes
http://www.student.lu.se/~nbi98oli/dnotify.html

2) write a shell script to do it. Open an xterm or whatever and watch the script (man 1 watch for more info)

I just sort of kicked this out, it just says new files found
when there is a change in the current directory. You would
probably need to hack it a little to suit your needs
Code:
#!/bin/sh

ls -t > ~/newfiles
if [ -e ~/oldfiles ]; then
	diff --brief ~/oldfiles ~/newfiles
	if [ $? -eq 1 ]; then
		echo "New files found or old files nodified."

	fi
	mv ~/newfiles ~/oldfiles
fi

Last edited by LogicG8; 10-30-2003 at 12:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snort alerts lord-fu Linux - Security 1 11-25-2005 03:28 PM
reply alerts mufy LQ Suggestions & Feedback 2 01-04-2005 06:56 AM
Mail alerts DrewB Linux - Newbie 6 10-21-2004 07:59 PM
Snort Alerts knight_ridda Linux - Security 13 06-21-2003 04:32 PM
Security Alerts jeremy Linux - Security 0 06-27-2001 08:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration