ArGest Backup User Guide

⌘K
  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal Archive Creation...
  5. Using Wildcard Filename Expansion

Using Wildcard Filename Expansion

When you are executing the bru command from the UNIX command line, you can specify the files parameter by including wildcards (special characters that the shell expands into matching filenames). BRU recognizes wildcard strings in the same format recognized by the Bourne and Korn shells. For example, if you have the following files in a directory:

file1
file2
file3

and if you enter this command on the command line (not, for example, as part of an executable shell):

bru -cv file*

The wildcard character “*” of the above command will be expanded by the UNIX shell and will match the three files. The command is equivalent to

bru -cv file1 file2 file3

This expansion is done by the UNIX shell, not by BRU.

Wildcard file name expansion can cause problems, especially if the command is entered from a directory in which there are many files or subdirectories. The following command is NOT necessary and is NOT recommended:

bru -cv *

Using the above syntax can result in your shell attempting to expand the wildcard character and could result in a command line buffer overflow. While BRU will not allow this to become a potential system security exploit, it will most likely cause the BRU command to fail, rather than run. If no files are specified, BRU will automatically back up all files in the current directory. The above command should be replaced with:

bru -cv

If you have problems when using wildcard names, it may be due to filename expansion limits set by the UNIX shell. To see how the filenames were expanded, check the BRU execution log, /var/log/bruexeclog. The “START” entry should contain a list of all the expanded names that were passed to BRU. NOTE: Wildcard characters are used in a slightly different manner when restoring from an archive. Wildcard characters used to specify file names with -x (file extraction) must be enclosed in double quotes. See Chapter 8, “Extracting Files: The BRU Restore Function,” “Using Wildcard Filename Expansion.”