![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to copy Folder with FTP | heru_90 | Shell Programming and Scripting | 1 | 08-22-2006 11:17 PM |
| how to copy hidden files from one folder to another | rajan_ka1 | UNIX for Dummies Questions & Answers | 1 | 11-07-2005 09:04 AM |
| Compress and copy a Folder | scorpiyanz | UNIX for Advanced & Expert Users | 1 | 08-19-2005 01:53 PM |
| copy folder contents | robsk8_99 | UNIX for Dummies Questions & Answers | 1 | 02-22-2005 06:54 PM |
| copy folder | tamemi | UNIX for Dummies Questions & Answers | 1 | 04-04-2004 10:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
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! |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|