|
|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Aleksey I Zavilohin 2:5020/400 23 Jan 2003 15:50:16 To : Andrey V Tutukin Subject : Re: backup updates -------------------------------------------------------------------------------- **** Andrey V Tutukin wrote: > Дано: директория на диске. > Hайти: способ отследить и сохранить изменения. не подойдет? $ apt-cache show dnotify Package: dnotify Priority: optional Section: utils Installed-Size: 72 Maintainer: Laurence J. Lane <ljlane@debian.org> Architecture: i386 Version: 0.12.0-1 Depends: libc6 (>= 2.3.1-1) Filename: pool/main/d/dnotify/dnotify_0.12.0-1_i386.deb Size: 14472 MD5sum: faf6920c56c654c860099812db4a7a7a Description: Execute a command when the contents of a directory change dnotify is a simple program based on Linux kernel 2.4.x+'s dnotify API. dnotify can execute a specified command each time the content of a specific directory changes. It is run from the command line and takes two arguments: one or more directories to monitor and a command to execute whenever a directory has changed. Options control what events to trigger on: when a file was read in the directory, when one was created, deleted and so on. $ apt-cache show fam Package: fam Priority: extra Section: admin Installed-Size: 192 Maintainer: Joerg Wendland <joergland@debian.org> Architecture: i386 Version: 2.6.9-1 Depends: portmap, debconf, libc6 (>= 2.3.1-1), libstdc++2.10-glibc2.2 (>= 1:2.95.4-0.010810) Filename: pool/main/f/fam/fam_2.6.9-1_i386.deb Size: 62128 MD5sum: 408227ec738002f1786fb9c233ca35e2 Description: File Alteration Monitor FAM monitors files and directories, notifying interested applications of changes. . This package provides a server that can monitor a given list of files and notify applications through a socket. If the kernel supports dnotify (kernels >= 2.4.x) FAM is notified directly by the kernel. Otherwise it has to poll the files' status. FAM can also provide a RPC service for monitoring remote files (such as on a mounted NFS filesystem). брать на ftp.debian.org - где гнездо у этих шняг 8-) смотреть ломает > Сначала, естественно, вся директория отправляется в tgz. При этом делается > что-то наподобие "ls -lR /.../directory > lslr.txt" > Потом (по crond, например) каждый день создаётся "lslr-$DATE.txt", который > сравнивается с предыдущим аналогичным файлом. При этом составляется список > изменённых и новых файлов, которые в конце концов попадают в очередной tgz. > Меня интересует, как лучше процесс сравнения реализовать. Можно программу > написать, которая будет разбирать вывод из ls -lR, но хотелось бы нечто > более надёжное, т.е. от локали, например, независящее. > Hужно дозарезу, помогите, пожалуйста! -- Lieberman's Law: Everybody lies, but it doesn't matter since nobody listens. --- ifmail v.2.15dev5 * Origin: EMS JSC (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/309093d3039a2.html, оценка из 5, голосов 10
|