How about some shell scripting ?
If you wan't to keep the files that has been changed, but also like the new ones to be attended, and you want to look the whole drictory tree through..
I know theres a better way to do the final `grep -v` thingys.. But I can't remember the correct syntax.Code:#!/bin/bash # first make sure no files that were touched on last run will be moved. cp -f new_file_list old_file_list # find the new files there ls -l > new_file_list # sort out, which are the new ones # or have been changed since last and do what ever for i in `ls -l | grep -v --file=old_file_list | awk '{print $NF}' \ | grep -v old_file_list | grep -v new_file_list`; do # what ever command you want done to $i done
[edit]
I forgot, this will also catch the directories, if you want to omit them, then use `ls -lF | grep -v / ` instead of the `ls -l`


Reply With Quote

Bookmarks