Product | Command Type |
---|---|
ClearCase | cleartool subcommand |
ClearCase LT | cleartool subcommand |
Attache | command |
Platform |
---|
UNIX |
Windows |
NOTE: A new directory element can be created only if its parent directory is checked out. mkdir appends an appropriate line to the parent directory's checkout comment.
The mkdir command creates one or more directory elements. (Operating system directory creation commands create view-private directories, not elements.) Unless you specify the -nco (no checkout) option, the new directory is checked out automatically. A directory element must be checked out before you can create elements and VOB links within it.
The mkelem -eltype directory command is equivalent to this command.
The new directory element is associated with the same storage pools (source, derived object, and cleartext) as its parent directory element. You can assign the directory to different pools with the chpool command. Note that the directory itself is stored in the database, but files created in the directory are stored in the pools associated with the directory.
In a snapshot view, this command also updates the directory element.
New directory elements are created with mode 777, as modified by your umask. However, the meanings of the read, write, and execute permissions do not have their standard UNIX meanings. See the protect reference page for details.
You cannot create a directory element with the same name as an existing view-private file or directory, and you cannot use mkdir to convert an existing view-private directory structure into directory and file elements. To accomplish this task, use clearfsimport.
Identities: No special identity is required.
Locks: An error occurs if one or more of these objects are locked: VOB, element type.
Mastership: (Replicated VOBs only) No mastership restrictions.
CHECKOUT OF THE NEW DIRECTORY. Default: mkdir checks out the new directory element.
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -cqe). See the comments reference page. Comments can be edited with chevent.
NAMING THE DIRECTORIES. Default: None.
The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
Create a subdirectory named subd, and check out the directory to the current view.
cmd-context mkdir -nc subd
Created directory element "subd".
Checked out "subd" from version "/main/0".
Create a subdirectory named release, but do not check it out. Provide a comment on the command line.
cmd-context mkdir -nco -c "Storage directory for released files" release
Created directory element "release".
checkout, mv, protect, pwd, rmelem, update
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |