Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Realtime monitoring of files in a directory Post 302913061 by RamanM on Wednesday 13th of August 2014 02:39:15 PM
Old 08-13-2014
Realtime monitoring of files in a directory

Hello Experts,

Here are my requirements.

I want to monitor a directory and retrieve file properties like file names along with file sizes of files being generated today and that exceeds a threshold limit (say 10MB) using a shell script.

Basically this shell script should monitor (kinda realtime monitoring) the directory and identify the files being generated and should satisfy the above condition.

The output should be written to a flat file in the following order.

File name | File size.

Please help me out with the solution.

Thank you in advance for your help :-)

Last edited by RamanM; 08-13-2014 at 04:00 PM..
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Monitoring file in a directory

Hi I need the commands that will enable me to monitor the files in a directory, preferably by date of the file and copy those files that have changed to a new directory. Please can someone help? Many thnaks in advance Kind regards from Pete (3 Replies)
Discussion started by: pete_leon
3 Replies

2. Shell Programming and Scripting

Monitoring a directory for new files with .xx and executing command if found

Hi Guys. I am a complete shell scripting newbie with some syntax and commands understanding. I'm more of a win admin. With that said: I need to write a shell script to monitor a directory '/Mon_Dir' for new occurrences of files with .xx extension. Once a new file is detected in the directory, a... (4 Replies)
Discussion started by: krkan
4 Replies

3. UNIX for Dummies Questions & Answers

monitoring a directory for changes

hi i need to monitor a directory for changes .. when ever a file is modified or created newly then the name of the file along with the user id and the ip address of the person who has created the file or modified it should be logged into a user specific file... (3 Replies)
Discussion started by: sais
3 Replies

4. UNIX for Dummies Questions & Answers

Monitoring specific files and folders

I want a mechanism to monitor a folder full of files that are sensitive. I want to log all accesses,modifications and changes to any file within the folder in a log file which should give me access/modify/change times,the user id of the process which tried and the pid. Even some idea of what to... (1 Reply)
Discussion started by: Vivek788
1 Replies

5. Solaris

realtime monitoring to Sunstorage 3310

Hi all, I have Sun storage 3310 and i have installed CAM to make real time monitor, but unfortunately CAM not supported to 3000 model. is there is any application like CAM and support to 3310 model i can use.. please ur advice?? Thx Regards, Ahmad (2 Replies)
Discussion started by: ahmad_wa
2 Replies

6. Shell Programming and Scripting

Advice on monitoring gziped files

so, every 5 minutes, i monitor some data files based on their line numbers. so if i checked now and there are 100 lines in the file, i will scan the 100 lines for specific errors. if i check again 5 minutes later and there are 150 lines in the file, i will monitor the file from line 100 to... (2 Replies)
Discussion started by: SkySmart
2 Replies

7. Shell Programming and Scripting

Copying files realtime

I have a primary server where certain files are created real time. These files have varying file sizes. I want to FTP or copy them over to a different server server as soon a file gets created. I have to ensure that only full file is copied. The receiving end process expects a FULL file. I am ok... (3 Replies)
Discussion started by: vskr72
3 Replies

8. Shell Programming and Scripting

Directory containing files,Print names of the files in the directory that are exactly same content.

Given a directory containing say a few thousand files, please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents. func(a_directory_name) output -> {“matches”: , ... ]} e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies
FAM_MONITOR_COLLECTION(3)						 1						 FAM_MONITOR_COLLECTION(3)

fam_monitor_collection - Monitor a collection of files in a directory for changes

SYNOPSIS
resource fam_monitor_collection (resource $fam, string $dirname, int $depth, string $mask) DESCRIPTION
Requests monitoring for a collection of files within a directory. A FAM event will be generated whenever the status of the files change. The possible event codes are described in detail in the constants part of this section. PARAMETERS
o $fam - A resource representing a connection to the FAM service returned by fam_open(3) o $dirname - Directory path to the monitored files o $depth - The maximum search $depth starting from this directory o $mask - A shell pattern $mask restricting the file names to look for RETURN VALUES
Returns a monitoring resource or FALSE on errors. SEE ALSO
fam_monitor_file(3), fam_monitor_directory(3), fam_cancel_monitor(3), fam_suspend_monitor(3), fam_resume_monitor(3). PHP Documentation Group FAM_MONITOR_COLLECTION(3)
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy