LinuxQuestions.org
Review your favorite Linux distribution.
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 05-02-2013, 11:47 PM   #1
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Rep: Reputation: Disabled
script auto delete files after downloaded


hi guys
there are clients accessing my server to download some files.
i want to create a script like
auto move those files to certain location after they are downloaded.

i was thinking like move them everyday 11.45pm..
but that is not that good..
can this be done? if yes, can you guys show me some guide? i didnt even know where to start, how to detect whether the files are being downloaded?
 
Old 05-03-2013, 12:14 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
First you need to figure how you know when the last(!) download (of each file) has been done ie is each file only downloaded once, or once per client or multiple times ... you see where I'm going with this. Basically, define when its safe to move the files.

For general file monitoring (& actioning), see http://linux.die.net/man/1/inotifywait
 
  


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
RHEL auto delete files with full hard drive mts7 Linux - Server 4 07-13-2010 06:47 PM
Script help - delete files older than 45 days but exclude the system files jojothedogboy Linux - Software 3 06-13-2008 04:43 PM
Auto delete files less than or equal to 3 KB maac_caam Linux - Desktop 2 06-07-2007 11:45 AM
script to auto delete files older than X days nocnoc Programming 17 12-06-2006 09:30 AM
Auto Delete oldest files @ratex when directory is 98% full jmanjohn61 Linux - Software 1 04-05-2005 04:44 PM


All times are GMT -5. The time now is 06:34 AM.

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