Go to the previous, next section.

Asking for Confirmation During Operations

Typically, tar carries out a command without stopping for further instructions. In some situations however, you may want to exclude some files and archive members from the operation (for instance if disk or storage space is tight). You can do this by excluding certain files automatically (

FIXME: pxref File Exclusion
), or by performing an operation interactively, using the `--interactive' (`-w') option. tar also accepts `--confirmation' for this option.

When the `--interactive' (`-w') option is specified, before reading, writing, or deleting files, tar first prints a message for each such file, telling what operation it intends to take, then asks for confirmation on the terminal. The actions which require confirmation include adding a file to the archive, extracting a file from the archive, deleting a file from the archive, and deleting a file from disk. To confirm the action, you must type a line of input beginning with `y'. If your input line begins with anything other than `y', tar skips that file.

If tar is reading the archive from the standard input, tar opens the file `/dev/tty' to support the interactive communications.

Go to the previous, next section.