ArGest Backup User Guide

⌘K
  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal Extract Files: T...
  5. Unconditional File Type Extraction: (-u flag)

Unconditional File Type Extraction: (-u flag)

Normally BRU will not supersede existing files while extracting files from an archive – that is, BRU will not overwrite an existing file with an older archived file of the same name. Specifying the -u flag option causes files of the type specified by the flags listed below to be unconditionally selected for extraction. Such files will overwrite any existing files of the same name regardless of modification times. If the verbosity level is two or higher (-vv through -vvvv), BRU will print a message for each file that is not superseded. The confirmation option (-w) may also be used with the -u flag option.

The available flags are:

a – Select all files
b – Select block special files
c – Select character special files
d – Select directories
l – Select symbolic links
p – Select fifos (named pipes)
r – Select regular files
f – Select regular files (the same as r)

Multiple flags select all files that match any of the given types. For example, -ubcd will select all block, character, and directory files. The -ua option will select all files and is equivalent to specifying each of the other individual flags.

Existing directories are never overwritten. If you select directories, only their attributes may be modified. The -u option merely allows directory attributes to be set back to some previously existing state.

If you select symbolic links, only the contents of the link will be modified. It is impossible under some versions of UNIX to change the access time, the modification time, or the file mode of a symbolic link.

The following example will extract all regular files in an archive, regardless of their modification dates. Any existing files with the same names will be overwritten. If any of the extracted files has been changed since the archive was created, all such updates will be lost.

bru -x -ur

The next example specifies that all of the files under directory ./usr/doe are to be extracted from the archive on the default device, and are to unconditionally overwrite any existing files with the same names:

bru -x -ur ./usr/doe