Table of Contents

Name

wremove - remove files and empty directories.

Synopsis

wremove [-AdfFLMnOqRUVX] [-jpatternList] [-o/Path] [-O[R1]-[R2]|Date] [-sDate] [-NWorkspaceName] [-hHost -SSnapshot [-DDir]] name ...

Description

wremove removes the indicated names from both the snapshot and workspace, and records the delete in the item's history. The delete can then be copied to other snapshots, just as with any other change to a file or directory.

A name can be removed without recording the delete in the item's history. See the discussion under the -U option for when you might want to use this option.

Individual revisions can also be removed. See the -O option description below.

Note: a file is not fully deleted from the archive until all snapshot references to it are removed. Prior to the last remove, and for some time after, a file can be recovered. See also the -U option to wset(1) .

Workspace Mapping

Mapping is consistent across all workspace commands. See wco(1) for details.

Default Options

Default options can be set on most workspace commands. See wco(1) for details.

Workspace Options

The workspace mapping is automatically looked up in the user's workspace mapping table for the given files. Override this by specifying an explicit workspace:
-NworkspaceName
Use the named workspace mapping.

Or override with a temporary workspace mapping with these three options:

-hHost
Use the SnapshotCM server on Host for a workspace mapping.
-SSnapshotPath
Use SnapshotPath for a workspace mapping.
-DWorkspaceDirectory
The local destination directory for a workspace mapping. This can be a relative or absolute path. If this option is not provided with the other two, the local destination directory defaults to the current directory where the command is executed.

For more information on workspace mappings, see wmap(1) .

Options

-A
Only remove names from the snapshot. Normally, workspace names are also removed. (Also see -L option.)
-d
Operate only on directories, skip any files. Combine with -R to remove all empty directories.
-f
Operate only on files, don't try to remove directories.
-F
Force the operation. This allows you to delete locally modified files, and unlink files and delete revisions without being prompted for confirmation.
-jpatternList
List only files whose name (or path) matches patternList. PatternList consists of one or more patterns separated by a '|' (pipe/or) symbol. Each pattern can contain shell wild cards as follows:

* - match 0 or more characters
? - match any one character
[set] - match any character in set
[!set] - match any character not in set

A pattern not ending in a slash ('/') matches only files. A pattern ending in a slash matches only directories. A pattern containing a slash other than at the end is matched against the full workspace path. Otherwise pattern is matched against the last component of the path. If patternList begins with an '!' (exclamation/bang) character, the normal selection is negated.

-L
Only remove names from the local workspace.
-M
Print workspace mapping before normal output.
-n
Show the operations that would happen, but do not execute them.
-o/Path
Map /Path in the selected snapshot to the specified (-D) local directory, creating a temporary, partial workspace mapping for the command. Normally, the root directory of a snapshot is what is mapped.
-O [R1]-[R2]|Date
Remove inactive revisions in the specified range. A revision is considered inactive if it is not referenced by a snapshot, not a merge or branch point, and not the newest revision.

One may specify a revision range or a cutoff date. For a revision range, the inclusive range of revisions is removed. If R1 is omitted, it defaults to the first revision. If R2 is omitted, it defaults to the last revision. The dash character is required for a range, else the arg is parsed as a date string, and revisions older than the date are removed. R1 and R2 can be revision numbers, or full snapshot paths, in which case the revision referenced by that snapshot is used.

If one or more active revisions are selected for removal, they will be silently skipped: only the inactive revisions will be removed. This allows removing all inactive revisions older than a given date without having to worry about which are active.

Once a revision is removed, it cannot be recovered.

-q
Quiet, do not print normal output.
-R
Operate recursively on all files and directories in the hierarchy.
-sDate
Set the modification date for the new revision. Date silently will be forced to be greater than any existing revision of file. Useful primarily for importing history from other CM systems. See wco(1) for supported date formats.
-U
Unlink name. Unlink removes name so that it is as if name never existed in snapshot. Unlinked names cannot be recovered, and the unlink is not added to the item's history. Use unlink to undo an inadvertent copy of a name into a snapshot. To cleanly split a snapshot, first make a snapshot copy, then unlink the extra files in each copy. Use the normal remove, not unlink, when you want the removal change to be promoted or copied to other snapshots and workspaces.
-V
Print internal version and exit.
-X
Display 'full archive path' names.

Diagnostics

Exit status is 0 if all specified names were successfully removed, 1 if any failures, and >1 if there was a bad option or a network error.

Examples

To remove all *.dsp files from your snapshot and workspace, run:

wremove -j*.dsp -R .

See Also

wci(1) , wco(1) , wdiff(1) , whist(1) , wls(1) , wmap(1) , wmerge(1) , wrename(1) , wset(1) , wupdate(1) .


Table of Contents