- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Directory monitoring
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2002 05:11 AM
тАО02-28-2002 05:11 AM
Directory monitoring
Someone know a tool or a script that can monitor a specific directory for any new file creation. I want to mirror my Oracle redo log file on an external FTP server but I don't want to sync the directory each hour... I want to copy the file when they appear in the oraarch...
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2002 05:28 AM
тАО02-28-2002 05:28 AM
Re: Directory monitoring
I haven't used it but rdist sounds like it may do that. It is available from the Software Porting and Archive Centres. One is:
http://hpux.cs.utah.edu/
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2002 05:30 AM
тАО02-28-2002 05:30 AM
Re: Directory monitoring
touch a file ex /tmp/checkdir before you start
with an old date
Then something like this running every hour
test=/tmp/checkdir
work=/tmp/checkwork
dir=/home/steves/tmp
find $dir -type f -newer $test > $work
touch $test
typeset -i found=$(cat $work|wc -l)
if [ "$found" -gt "0" ]
then
cat $work|while read line
do
echo ftp $line to remote
done
fi
/bin/rm $work 2>/dev/null
If file are found newer than the checkfile you can ftp them or rcp them
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2002 05:48 AM
тАО02-28-2002 05:48 AM
Re: Directory monitoring
You really want to do it when the file is closed, for this test I'd suggest getting "lsof" from:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/
and writing a perl program monitor directory changes. It's important to make sure the file is no longer "inuse". Also with perl you can ftp directly from it.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2002 05:51 AM
тАО02-28-2002 05:51 AM
Re: Directory monitoring
Harry, to do that we can use the "fuser -u $filename" command. The perl language is not necessary.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2002 06:19 AM
тАО02-28-2002 06:19 AM
Re: Directory monitoring
Oracle redo logs are created when the database is created and don't change on a daily basis (the contents change, the file doesn't)
If you really want to copy your redo logs somewhere, turn archivelog mode on and tell oracle where to put the archived redo logs when they are switched out.