![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to copy Folder with FTP | heru_90 | Shell Programming and Scripting | 1 | 08-22-2006 08:17 PM |
| how to copy hidden files from one folder to another | rajan_ka1 | UNIX for Dummies Questions & Answers | 1 | 11-07-2005 06:04 AM |
| Compress and copy a Folder | scorpiyanz | UNIX for Advanced & Expert Users | 1 | 08-19-2005 10:53 AM |
| copy folder contents | robsk8_99 | UNIX for Dummies Questions & Answers | 1 | 02-22-2005 03:54 PM |
| copy folder | tamemi | UNIX for Dummies Questions & Answers | 1 | 04-04-2004 07:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Bad approach imho. Please tell us why you aren't using network filesystem or san concepts.
Otherwise man inotify for 2.6 kernels and man fcntl for 2.4 kernels searching for F_NOTIFY. |
|
#3
|
|||
|
|||
|
I'm trying to do something similar and have been reading posts and experimenting all day. On my team, we sometimes modify a file with vi but forget to stop and make a backup copy of the original first. You can imagine that "rollback" is almost impossible with this little "problem."
I'd like to do an automatic copy, date/time stamp automatically appended to the file name, and alias vi to call this automatic copy script as follows: vi <file> file is automatically copied to <file>.00814201440 make your changes quit vi If you worked out this problem or (anyone) came up with an answer or can, please let me know, thanks! |
|||
| Google The UNIX and Linux Forums |