Realtime monitoring of files in a directory


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Realtime monitoring of files in a directory
# 1  
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..
# 2  
Old 08-13-2014
What is your system?

What have you tried?

Will these files always be complete, or might you catch them in the middle of being generated?

We are not a free scriptwriting service. If you come here with nothing but requirements we can't help you.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
Login or Register to Ask a Question