Sponsored Content
Top Forums UNIX for Advanced & Expert Users Auto copy for files from folder to folder upon instant writing Post 302185740 by Bashar on Tuesday 15th of April 2008 06:51:22 PM
Old 04-15-2008
Auto copy for files from folder to folder upon instant writing

Hello all,
I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written.

I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me scenario because the written files to /path/to/a/ gets deleted on random timing sometimes the file get written and deleted in less than 5 seconds sometimes its over a minute or hours.

is there a technique in unix that i'm unaware of that does this?

Platform is mostly Linux flavors such as redhat/centos/debian or FreeBSD

Thank you.
Bashar
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to copy one folder to another with existing files

For example, /tmp/folder1 includes /tmp/folder1/a /tmp/folder1/b /tmp/folder2 includes /tmp/c Is there a command without removing files in /tmp/folder2 first to copy the /tmp/folder1 to /tmp/folder2? and the result should be /tmp/folder2 will include only /tmp/folder2/a... (2 Replies)
Discussion started by: lalelle
2 Replies

2. Shell Programming and Scripting

Find all text files in folder and then copy to a new folder

Hi all, *I use Uwin and Cygwin emulator. I´m trying to search for all text files in the current folder (C/Files) and its sub folders using find -depth -name "*.txt" The above command worked for me, but now I would like to copy all found text files to a new folder (C/Files/Text) with ... (4 Replies)
Discussion started by: cgkmal
4 Replies

3. Shell Programming and Scripting

Copy files from folder and rename them

hello, I need to build a shell script that receives the folder to copy by parameter and copy all files except thumb.db to another folder and rename them like, file.jpg renamed to file_bb1.jpg. can someone help me Thanks (4 Replies)
Discussion started by: zeker
4 Replies

4. Shell Programming and Scripting

Copy files from one folder to another with rule

Hello! Please, help me to find or write this simple bash-script. I have first folder /tmp/work/folder1 with such files: name1.txt name2.txt.1 name2.txt.2 name3.txt name4.txt name4.txt.1 name4.txt.2 name4.txt.3 etc.. I need to copy all files from folder1 to folder... (1 Reply)
Discussion started by: optik77
1 Replies

5. UNIX for Dummies Questions & Answers

How to copy files to one folder?

Hi , I have a file like this, i need to trace its path and copy the files from its path to one folder. I need to replace elib.com,melib.com to F:\.Here i need to copy to a folder called image. Please help http://elib.com/SHC/NLNLHB/020001498.pdf ... (4 Replies)
Discussion started by: umapearl
4 Replies

6. Shell Programming and Scripting

Problem in copy files to a folder

Hi all, cp -r /tmp/Agent/* /apps/opt/Agent/TEST When I copy files under /tmp/Agent using this command Files are getting copied to Agent folder also but I need only in the TEST folder. Is there any way to fix this issue??\ Thanks in advance Ananth (4 Replies)
Discussion started by: Ananthdoss
4 Replies

7. Shell Programming and Scripting

copy folder and its contents to another folder

Hi experts, I am coming to you with this basic question on copying a folder and its content from one location to another folder using PERL script. This is my requirement. I have a folder AB under /users/myhome I want to copy AB and its contents to /user/workspace. Finally it should... (1 Reply)
Discussion started by: amvarma77
1 Replies

8. UNIX for Dummies Questions & Answers

Copy files to folder.

Hi, I have a folder which contains some files like this. bin.000001 bin.000002 bin.000003 bin.000004 bin.000005 bin.000129 bin.index I want to copy all these files to a new folder except the last files. Please provide some ideas. Please use next time code tags for your code... (6 Replies)
Discussion started by: arijitsaha
6 Replies

9. Shell Programming and Scripting

Problem writing/wrapping files under folder using perl

I have a script which generates env setup xml file by reading path.It read the path and checks if there is any file/dir present recurseively. If a file is found under sub directory then it will read the file and the values from the file are passed to generate xml format. Problem is if i have a... (0 Replies)
Discussion started by: Optimus81
0 Replies

10. Shell Programming and Scripting

How to copy files with the same filenames as those in another folder to that same folder?

Hello All A similar question like this was asked before but I need to change part of the question. I've two folders, Folder A contains some image files in 150 subfolders; Folder B contains text files in 350 subfolders. All image files in Folder A have the same filename as the text... (5 Replies)
Discussion started by: chlade
5 Replies
mlmmj-maintd(1) 					      General Commands Manual						   mlmmj-maintd(1)

NAME
mlmmj-maintd - maintenance for mlmmj maintained lists SYNOPSIS
mlmmj-maintd [-F] [-d | -L] /path/to/dir -d: Full path to directory with lists -L: Full path to list directory -F: Don't fork, performing one maintenance run only. DESCRIPTION
This is the program doing the maintenance for an mlmmj based mailing list. It will unsubscribe people who have bounced for long enough, send out bounce probes, resend mails that couldn't be delivered to relayhost, clean out stale requests for e.g. subscription, resend list mails and clean up leftover files etc. If a directory containing several lists exists, the -d can be used to specify this, making mlmmj-maintd perform a maintenance run in every listdir below the specified one. Only either -d or -L can be specified at the same time. It will run as a daemon, unless the -F switch is specified, in which case it just runs once. The -F option should be used when one wants to avoid running another daemon, and use e.g. cron to control it instead. In case cron is used, mlmmj-maintd should be run every 2 hours or so. An example crontab entry: 0 */2 * * * /usr/bin/mlmmj-maintd -F -L /path/to/list AUTHORS
This manual page was written by the following persons: Soren Boll Overgaard <boll@debian.org> (based on html2man output) Mads Martin Jorgensen <mmj@mmj.dk> mlmmj-maintd September 2004 mlmmj-maintd(1)
All times are GMT -4. The time now is 12:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy