script assistance needed - create an archive of INI files

First and foremost - me != unix bubba.

Here is the situation. We have a box with data AND settings in the same directory path. (Data files aren't in the SAME directories as settings.) I need a script that generates a tarred-up archive of only the INI files with the directory structure. We have terabytes of data that are in sub directories below where the INI files are located, and this bogs down any recursive find that I attempt.

Any ideas?

Danny "hindesite" Hindes

If it comes to locating data in a tree there isn't really a faster option than find. One option might be

find /path -type f -name '*.ini' -print | cpio -o | gzip -9c > backup.cpio.gz
1 Like

OK, I'll give it a try & post back. Quick question - in a sentence or less, what does piping to cpio do? Also, I now have a file I created that is a list of all starting points where the INI files are only on level down - so I can control the find command with the depth switch, looping through the file with a for. But before I do that, I'll let your find commnd work in the background and see how long it takes.

Thanks for the help.

  • Danny Hindes