zap

destroy a damaged file (QNX)

Syntax:

zap [-Rpv] file

zap [-Rpv] [-l|-u] directory

Options:

-R
Enter Rambo mode! Override the filesystem (allow zap when files are open on the disk).
-l
("el") List previously zapped files in the directory.
-p
Pause before starting (for floppy disks).
-u
"Unzap" files in the directory.
-v
Be verbose; report results.
file
The name of the file to remove.
directory
The name of the directory containing previously zapped files.

Examples:

Eliminate the directory entry for the file junk:

zap junk

Description:

You should use zap on a file if:

or

The zap utility releases a file by clearing the directory entry for that file. The disk blocks used by the file aren't reclaimed. Therefore, if you use zap repeatedly, you'll reduce the total number of disk blocks available on the disk. You can reclaim these, however, by running the chkfsys utility when the system is idle.

Normally, you should use the rm or rmdir commands to release files or directories.

Previously zapped files may be listed in any specified directory using the -l option.

You can "unzap" or recover zapped files by using the -u option. The utility will prompt for each file that was zapped in the specified directory.

The file to be "unzapped" must have been initially removed via a zap command. Files removed conventionally via rm or any other process which calls unlink() cannot be restored by means of the zap -u command.

Exit status:

0
Successful.
>0
An error occurred.

See also:

Caveats:

To remove a file from a device that has any files open, you must use the -R (Rambo) option.