Visit Our UNIX and Linux User Community

monitoring files copied onto hard disk

Thread Tools Search this Thread
Top Forums Programming monitoring files copied onto hard disk
# 1  
Old 02-09-2006
Question monitoring files copied onto hard disk


i need pointers to books/website...

'm trytin to write a daemon that monitors files of particular type(eg. text or pdfs) copied onto the hard disk. the daemon should detect the above n write the file name (along with the absolute path) to a file.

please DO NOT give me the code explicitly...
# 2  
Old 02-15-2006
Why would you want that Smilie
The easiest way i can see is to use LKM and reroute some interesting apis (like write maybe ?)
So that's not really a daemon (userland) you're directly playing with kernel (wonderland Smilie )
# 3  
Old 02-15-2006
I have to agree with Andryk - it seems to me to be a bit non-sequitur, you seem to want a kind of FindFirstChangeNotification api for UNIX. Some things that make sense in one OS don't translate well to others. IMO.

The only suggestion I have is get a copy of lsof or fuser for your unix system and investigate what was done in there. If you're on a UNIX that supports /proc then you may already have what you need.

Previous Thread | Next Thread
Test Your Knowledge in Computers #587
Difficulty: Medium
All programming languages support recursion.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Disk usage monitoring and record the disk used in last 24 hour

HI I am Trying to edit the below code to send email every day with difference of disk utilized in for last 24 hours but instead getting same usage everyday. can you please help me to point out where my calculation is going wrong. Thank you. ================= #!/bin/bash TODAY="at $(date... (0 Replies)
Discussion started by: Mi4304
0 Replies

2. Solaris

Copied prtvtoc to original disk

Hi, It is Solaris-10 with ZFS. c0t1d0 is original disk. c0t0d0 was faulty disk, which was replaced with new one and by mistake somebody ran opposite command # prtvtoc /dev/rdsk/c0t0d0s0 | fmthard -s - /dev/rdsk/c0t1d0s0 Now rpool is in suspended state. Right now server is up, but allowing ssh... (6 Replies)
Discussion started by: solaris_1977
6 Replies

3. Shell Programming and Scripting

no of files copied by scp command

hi, I have a script which copy files by using scp command. when i run that script, i can see the process meter but I want to know how many files have been copied. suppose, by using scp 10 files is being copied and I can see process meter for all 10 files. but i also want to see ... that 10... (0 Replies)
Discussion started by: anshu ranjan
0 Replies

4. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

5. SCO

declare disk driver for IDE hard disk

hi I've a fresh installation of SCO 5.0.7 on the IDE hard disk. For SCSI hard disk I can declare, for example blc disk driver using: # mkdev hd 0 SCSI-0 0 blc 0but it works for IDE hard disk? (3 Replies)
Discussion started by: ccc
3 Replies

6. UNIX for Advanced & Expert Users

Monitor files being copied/accessed

Hello, Is there a way (without 3rd party software) to know if a file has been accessed and/or copied ? I'm interested in any solution : doing command line instructions , running background scripts etc... I apologize if I posted this in the wrong forum. Thank you! (8 Replies)
Discussion started by: prostiiinet
8 Replies

7. UNIX for Dummies Questions & Answers

Hard Disk at 99% Help!

:eek: I use this Solaris to run CMS a call acounting software package for my job. No one could run reports today because it said the this when you logged on "The following file systems are low, and could adversely affect server performance: File system /: 99%full" Can some one please explain... (9 Replies)
Discussion started by: mannyisme
9 Replies

8. UNIX for Dummies Questions & Answers

Ignoring already copied files

I'm almost brand new to UNIX, so I have no idea if how easy or difficult this would be, or if it's even possible. I've been using FTP to copy a total of about 150gb of files to a remote drive. Since the directory being copied is so large, I've been trying to break it up into smaller chunks based... (0 Replies)
Discussion started by: nvandyke
0 Replies

9. Shell Programming and Scripting

Script that can Copy a Range of files from Tape to Hard disk

Hi: I am a trying to write a script using a loop i guess. What I need to do is write a script that can allow my users to load a tape and copy a range of files from a tape to the hard disk. By range I mean, I would like the users to pick a range of numbers like files 3 - 8 and the script will... (0 Replies)
Discussion started by: msjazzie
0 Replies

10. UNIX Desktop Questions & Answers

Hard Disk

I have a cuestion. How Can I to add other hard disk to my computer? I need to configurate anyone? (4 Replies)
Discussion started by: hmaraver
4 Replies

Featured Tech Videos