LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-14-2008, 06:34 AM   #1
modpriest
Member
 
Registered: Dec 2007
Posts: 32

Rep: Reputation: Disabled
Exclamation How to write crontab to check file size and all file in a directory?


I'm new to linux and i need to build a crontab to check file size, file last modify date, and all file in a directory.

I try using cgi to write it but doesn't work.

Can anyone help give me a guide or something?
 
Old 02-14-2008, 06:48 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,776

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
That isn't crontab's function. Crontab's function is to run job at scheduled times. Shell scripts do the information retreival.

So, you need to write a script (bash, awk, python, perl, or something like that) to get the information you want, and use cron to schedule the times to run that script.
 
  


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
perl- check size to see if file is complete michael.barnes Programming 2 02-13-2008 06:20 PM
cannot write file or directory over network monasmah Linux - Security 1 03-20-2007 02:10 PM
Can you write a script to display file name, Inode, and size of any file? JaxsunApex Linux - Newbie 3 01-30-2007 08:39 AM
part_nowrite check:: No such file or directory darkarcon2015 Linux - Software 2 02-12-2006 02:32 PM
Need script to check file size. _TK_ Linux - General 1 08-06-2001 08:30 AM


All times are GMT -5. The time now is 05:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration