This section describes how to use the command-line interface to manage the file hierarchy of the Change Manager repository.
The top of the Files section hierarchy is a folder.
Determine where to create the folder.
For example, create a folder in the web-server folder.
Create and name the folder.
$ changemgr mkdir [ -u username ] [ -p file ] reldirpath ... |
Specify the user name to authenticate. If this option is not specified, the user is the current UNIX user.
file consists of a single line, which contains the password. If file is -, then the user can supply the password as standard input.
If the -p option is not supplied, then the changemgr command prompts the user for his password.
Specifies the path to a folder that is relative to the top of the Change Manager repository.
Choose a meaningful name that indicates the types of files the folder contains. For example, create a folder named apache in which to store objects related to the Apache web server.
Suzi creates the apache folder in the web-server folder.
$ changemgr mkdir -p .pfile /web-server/apache |
The rename action can be taken on one file or folder at a time.
Determine which file or folder to rename.
For example, rename the web-server/apache folder to be web-server/ApacheServer.
Rename the file or folder.
$ changemgr filemove [ -u username ] [ -p file ] old_relfilepath.type \ new_relfilepath.type |
Specifies the path to a file or folder. The path is relative to the top of the Change Manager repository.
Specifies the file name suffix that represents the file type. File type suffixes are as follows:
.flar for archives
.miniroot for boot images
.bmft for manifests
.brul for audit rules files
.txt for reports
.cmsp for shared profiles
Folders do not use a file suffix.
For descriptions of the other options, see How to Create a Folder (Command Line).
Suzi renames the web-server/apache folder to be web-server/ApacheServer.
$ changemgr filemove /web-server/apache \ /web-server/ApacheServer |
Only files, not folders and Solaris boot images, can be exported.
Determine which files to export.
For example, export the /web-server/apache/host1.bmft file to host2:/home/suzi.
Export the files:
Export a single file, relfilepath, from the repository as filepath.
$ changemgr export [ -u username ] [ -p file ] relfilepath filepath |
Export one or more files to the specified folder, dirpath, outside of the repository.
$ changemgr export [ -u username ] [ -p file ] relfilepath ... dirpath |
Specifies an absolute or relative path to a directory. This directory is not within the Change Manager repository.
Specifies an absolute or relative path to a file. This file path is not within the Change Manager repository.
Specifies the path to a file, not including a folder, that is relative to the top of the Change Manager repository.
For descriptions of the other options, see How to Create a Folder (Command Line).
Suzi exports the /web-server/apache/host1.bmft file to her home directory, /net/host2/home/suzi.
$ changemgr export /web-server/apache/host1.bmft \ /net/host2/home/suzi/host1.bmft |
Suzi exports the /web-server/apache/host1.bmft file and the /web-server/apache/host2.bmft file to her home directory, /net/host2/home/suzi.
$ changemgr export /web-server/apache/host1.bmft \ /web-server/apache/host2.bmft /net/host2/home/suzi |
Determine which files and folders to move.
For example, move the web-server/host1.bmft file and the web-server/host2.bmft file to the web-server/ApacheServer folder.
Move the files and folders to another folder in the Change Manager repository.
$ changemgr filemove [ -u username ] [ -p file ] relfilepath ... \ reldirpath |
Specifies the path to a file or folder that is relative to the top of the Change Manager repository.
For descriptions of the other options, see How to Create a Folder (Command Line).
Suzi moves the web-server/host1.bmft file and the web-server/host2.bmft file to the web-server/ApacheServer folder.
$ changemgr filemove /web-server/host1.bmft \ /web-server/host2.bmft /web-server/ApacheServer |
Folders must be empty before you delete them.
Determine which files and folders to delete.
For example, delete the web-server/host1.bmft file, the host2.bmft file, and the web-server/ApacheServer folder.
Delete the files and folders.
$ changemgr delete [ -u username ] [ -p file ] relfilepath ... |
Specifies the path to a file or folder that is relative to the top of the Change Manager repository.
For descriptions of the other options, see How to Create a Folder (Command Line).
Suzi deletes the web-server/host1.bmft file, the host2.bmft file, and the web-server/ApacheServer folder.
$ changemgr delete /web-server/host1.bmft \ /web-server/host2.bmft /web-server/ApacheServer |
A folder can contain files and other folders.
To modify folder properties, see How to Modify File or Folder Properties (Command Line).
Determine which folder to view.
For example, view the contents of the web-server/ApacheServer folder.
View the folder contents.
$ changemgr files [ -u username ] [ -p file ] [ -l ] [ -d ] [ -R ] \ [ -o format ] [ relfilepath ... ] |
Present detailed information in tabular form.
Present information about the folder itself, rather than about the folder's contents.
Describe all the folder's descendents.
format is a blank-separated list or comma-separated list of property names. If you separate the property names with spaces, make sure that you surround the list of property names with quotes. The specified property values are displayed in a name-value format. If format is specified as all, then all properties are displayed. The output is suitable for programmatic parsing.
Specifies the path to a file or folder that is relative to the top of the Change Manager repository.
For descriptions of the other options, see How to Create a Folder (Command Line).
Suzi views the contents of the root of the Change Manager repository, which is the root folder.
$ changemgr files |
Suzi views the contents of the web-server/ApacheServer folder.
$ changemgr files /web-server/ApacheServer |
Suzi views the information about the web-server/ApacheServer folder.
$ changemgr files -d /web-server/ApacheServer |
Suzi views the contents of the web-server/ApacheServer folder in table form.
$ changemgr files -l /web-server/ApacheServer |
Suzi views the contents of the web-server/ApacheServer folder and the folder's descendents.
$ changemgr files -R /web-server/ApacheServer |
Suzi views the contents of the web-server/ApacheServer folder. She wants to see the values of the Description property and the save property for each object. Note that you can use either format shown.
$ changemgr files -o Description,save /web-server/ApacheServer |
$ changemgr files -o "Description save" /web-server/ApacheServer |
Suzi views the contents of the web-server/ApacheServer folder and wants to see the values of all the properties for each object.
$ changemgr files -o all /web-server/ApacheServer |
Suzi views detailed information in table form about the contents and all properties of the web-server/ApacheServer folder and the folder's descendents.
$ changemgr files -l -R -o all /web-server/ApacheServer |
To view file or folder properties, see How to View Folder Contents (Command Line).
Determine which file or folder properties you want to modify.
File - For example, modify the properties of the web-server/ApacheServer/ApacheWebServer.flar file.
Folder - For example, modify the properties of the web-server/ApacheServer folder.
To modify the properties, supply the property names and values.
$ changemgr fileset [ -u username ] [ -p file ] [ -s name=value ] ... \ [ -s name ] ... relfilepath ... |
Specify one or more name-value pairs. name is the property name, and value is the property value. Supply this option for each property value you want to set. If value is blank, then the property is assigned an empty value.
Specify one or more property names to delete, where name is the property name. Supply this option for each property you want to delete.
Specifies the path to a file or folder that is relative to the top of the Change Manager repository.
For descriptions of the other options, see How to Create a Folder (Command Line).
Suzi modifies the Description property of the web-server/ApacheServer/ApacheWebServer.flar file.
$ changemgr fileset -s Description="Apache Web Server archive" \ /web-server/ApacheServer/ApacheWebServer.flar |
Suzi deletes the Description property of the web-server/ApacheServer/ApacheWebServer.flar file.
$ changemgr fileset -s Description \ /web-server/ApacheServer/ApacheWebServer.flar |
Suzi deletes the Description property and the Name property from the web-server/ApacheServer/ApacheWebServer.flar file.
$ changemgr fileset -s Description -s Name \ /web-server/ApacheServer/ApacheWebServer.flar |
Suzi deletes the Description property from the web-server/ApacheServer/ApacheWebServer.flar file and the web-server/ApacheServer/ApacheWebServer.txt file.
$ changemgr fileset -s Description \ /web-server/ApacheServer/ApacheWebServer.flar \ /web-server/ApacheServer/ApacheWebServer.txt |
Suzi recursively sets the Description property of the contents of the web-server/Apache Server folder.
$ changemgr fileset -R \ -s Description="File related to the Apache Web Server" \ /web-server/ApacheServer |
Suzi modifies the Description property of the web-server/Apache Server folder.
$ changemgr fileset \ -s Description="Folder to hold Apache Web Server files" \ /web-server/ApacheServer |