Skip Headers

Oracle Internet File System Setup and Administration Guide
Release 9.0.2

Part Number A95995-01
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

A
Command Line Utilities Reference

This appendix provides instructions for running the Command Line Utilities and a complete listing of the commands. The Command Line Utilities allows experienced system administrators to perform tasks from the command line prompt rather than the graphical user interface.

If an argument to the Command Line Utilities has spaces or an "=", it must be enclosed within double quotes (""). For example, cat "test document" or ls "backup folder 1999" or ls -class Document "name='Mydoc'".

Topics include:

Oracle 9iFS Command Line Utilities Installation and Configuration

Oracle 9iFS Command Line Utilities are installed on the server machine when Oracle 9iFS is configured, and can be used on the server machine to perform a variety of administration tasks. Optionally, Oracle 9iFS administrators can also install the software on a UNIX workstation or Windows client machine, for initiating commands remotely, as detailed in this section.

Table A-1 Command Line Utilities Client Software Location
Client Tool UNIX Windows

Command Line Utilities

/ifs/clients/cmdline/unix

/ifs/clients/cmdline/win32

To install the Command Line Utilities, simply copy the entire directory where the files are located from the Oracle 9iFS server to a directory on your local machine, as follows:

  1. Make a directory on the local machine for the Command Line Utilities, and change to that directory; for example, on a Windows client:

    c:\cd cmdline
    
    
  2. Select the version of the files, located in the directory on the Oracle 9iFS server , for the client workstation into which you're installing, and either map a drive (from Windows) or use FTP (from UNIX) to that directory (shown in Table A-1).

  3. Copy the contents to the local directory.

  4. In a text editor, open the ifscmdline.sh (Unix) or ifscmdline.bat file (Windows NT/2000 clients) on the local machine and edit the parameters listed in Table A-2 to specify the appropriate path information for the Command Line Utility to run from the client and connect to the specified server.

Additional information about the settings is contained in the ifscmdline file.

Table A-2 ifscmdline Parameters
Parameter Description Example

IFS_CMD_CLASSPATH

Location of the cmdlineutils.jar file. Set to the path on the local machine.

c:\cmdline\cmdlineutils.jar (Windows)

IFS_COOKIE_DIRECTORY

Location of the IfsCookie file. If not set, IfsCookie file is stored in the current working directory. IfsCookie file is generated each time a user logs in; stores session information for the Command Line Client Utilities.

c:\cmdline (Windows)

JRE_CMD

Specify the location of the JDK binary.

c:\jdk1.2.2\bin\java

IFS_CUP_SERVER

Machine name of the server on which the Command Line Utility Protocol (CUP) Server is running.

ifstestmachine

IFS_CUP_PORT

Default port for CUP protocol is 4180. Enter the correct port number in the ifscmdline file if the CUP server is running on a port other than 4180.

set IFS_CUP_PORT=4182 (Windows)

export IFS_CUP_PORT=4182 (Unix)

Running the Command Line Utilities

You can run the Command Line Utilities interactively or in batch mode.

To use the commands interactively, you must use the script. On the command line, type ifsshell. When using the shell, you do not need to enter the entire command. For example, if you want to log in, type login <name>/<password>.

Using a batch mode, you have the ability to perform many actions at once. To start the Command Line Utilities in batch mode, at the command prompt, type ifsshell -i <filename>. This tells the operating system to execute the batch file. The file should contain a list of commands that you use in ifsshell.

In most cases, you will use the Command Line Utilities in an interactive mode by using your operating system. The following sections describe the procedures for running the Command Line Utilities.

Starting the Command Line Utilities

The Command Line Utilities protocol server is started automatically when the Internet File System node is started. From your operating system, you can log on by using the login command.

Navigation Commands

The following commands are used for navigation throughout Oracle 9iFS.

cd

Changes the current working directory to the directory specified. If no working directory is specified, this command changes the current working directory to the home directory of the user in Oracle 9iFS. The default home directory is /home/<username>.

Syntax:
cd <directory>
Examples:
cd /osh or cd ./osh

Changes the current working directory to /osh, or to <current working dir>/osh.

cd

Changes the current working directory to the home directory of the user in Oracle 9iFS.

cd ..

Changes the current working directory one level up from the current directory.

pwd

Displays the current working directory in Oracle 9iFS.

Syntax:
pwd

pwd does not take an argument.

Example:
pwd

Displays the current directory, /home/scott.

File Manipulation Commands

cp

Copies the source file to the specified destination. If the destination is an existing directory, the file is copied into that directory with the same name. If the destination is a filename, the source file is copied to that file. If the destination file already exists, the copy defaults to versioning semantics.

Syntax:
cp <source> <destination>
Examples:
cp specifications.doc /osh/specifications2.doc

Copies specifications.doc to /osh/specifications2.doc, only if /osh exists.

cp specifications.doc /osh

Copies specifications.doc to /osh.

get

Retrieves the file to the specified local directory.

Syntax:
get <iFSfile> <localfile>
Examples:
get specifications.txt get specifications.txt /osh/specifications.txt

Picks up the file, specifications.txt, and copies it to the local directory, /osh/specifications.txt.

getattr

Display the attributes of an object. By default, all attributes are displayed.

Syntax:
getattr [<object options>] <objectvalue> [<listing options>]
Options

Object Options:

-path

This is the default option but can be set explicitly. The object value will be evaluated as a path to an object.

-id

The object value will be evaluated as an ID of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-user

The object value will be evaluated as the name of a DirectoryUser.

-valuedefault

The object value will be evaluated as the name of a ValueDefault.

-class <classname>

Identifies objects based on the classname and the object value. The object value will be evaluated as a where clause.

Listing Options:

-l

In addition to the name of each object, this option displays the class name of the object, the ACLs, owner name, size in bytes, and timestamp (the modification time unless other times are selected).

-attr <attribute list>

Displays the attributes specified for the identified object.

-attrall

Displays all attributes for the identified object.

Examples:
getattr signature.txt

Displays all attributes for signature.txt.

getattr signature.txt -attr owner acl createDate

Displays the owner, ACL, and creation date for signature.txt.

getattr -id 1234 -attrall

Displays all attributes for the object identified by ID 1234.

getattr -class document "name like '%foo%'"

Displays all documents whose class is "%foo%".

mkdir

Creates a directory with the specified name.

Syntax:
mkdir [<options>] <directory>
Options:

-p

Creates the complete directory path.

Examples:
mkdir testDir

Creates testDir in the current directory.

mkdir -p a/b/testDir

Creates a/b/testDir, creating each directory in the path as needed.

setattr

Sets the attribute value on an object. Given an object and an attribute name, the datatype can be determined. For simple attributes types (string, double, integer, boolean, long, and date) the attrvalue is interpreted. For attribute types that refer to objects, the attrvalue is interpreted as a path unless attr options are used.

Syntax:
setattr [<object options>] <objectvalue> <attrname> [<attr options>] [<attrvalue>]
Options:

Object Options:

-path

This is the default option but can be set explicitly. The object value will be evaluated as a path to an object.

-id

The object value will be evaluated as an ID of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-user

The object value will be evaluated as the name of a DirectoryUser.

-valuedefault

The object value will be evaluated as the name of a ValueDefault.

-class <classname>

Identifies objects based on the classname and the object value. The object value will be evaluated as a where clause.

Attribute Options:

-avpath

This is the default option, but it can be set explicitly. The attribute value will be evaluated as a path to an object.

-avid

The attribute value will be evaluated as an id of an object.

-avsystemacl

The attribute value will be evaluated as the name of a SystemAccessControlList.

-avuser

The attribute value will be evaluated as the name of a Directory User.

-avvaluedefault

The attribute value will be evaluated as the name of a ValueDefault.

-avclass <classname>

Identifies a unique object based on the classname and the attribute value. The attribute value will be evaluated as a where clause. If more than one object is identified, an error message is generated.

-avnull

Sets an attribute to null.

Examples:
setattr -id 1234 owner -avuser scott

Changes the owner attribute of the object identified by ID 1234 to be scott.

setattr -user scott description "System Administrator"

Changes the description attribute of the DirectoryUser object identified by scott.

showallpaths

Displays all folder references to the specified object. The specified object must be a Public Object.

Syntax:
showallpaths [<object options>] <objectvalue>
Options:

-path

This is the default option but can be set explicitly. The object value will be evaluated as a path to an object.

-id

The object value will be evaluated as an id of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-user

The object value will be evaluated as the name of a DirectoryUser.

-valuedefault

The object value will be evaluated as the name of a ValueDefault.

-class <classname>

Identifies objects based on the classname and the object value. The object value will be evaluated as a where clause.

Examples:
showallpaths signature.txt

Displays all folder references to signature.txt.

showallpaths -id 1234

Displays all folder references to the object identified with the ID 1234.

ls

Lists the items as specified. If no arguments are specified, the contents of the current directory are listed alphabetically. If the object identified is a folder, the contents of the folder are listed. Wildcard strings are not supported.

Syntax:
ls [<options>] [<objectvalue>] [<listing options>]
Options:

Object Options:

-path

This is the default option but can be set explicitly. The object value will be evaluated as a path to an object.

-id

The object value will be evaluated as an ID of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-user

The object value will be evaluated as the name of a DirectoryUser.

-valuedefault

The object value will be evaluated as the name of a ValueDefault.

-class <classname>

Identifies objects based on the classname and the object value. The object value will be evaluated as a where clause.

Listing Options:

-l

In addition to the name of the object, this option displays the file type, ACLs, owner name, size in bytes, and modification date. Last line is the total number of objects.

-attr

This option displays the attributes specified by the identified object.

-attrall

Displays all attributes for the identified object.

Examples:
ls

Lists the names of the items in the current directory.

ls osh

Lists the names of the items in the osh directory.

ls -id 1234 -attrall

Lists all the attribute values of the object identified by the ID, 1234. If the object identified is a folder, all the attributes for the contents of the folder are listed.

ls -class DOCUMENT -attr name description

Lists the names and descriptions of all the documents in Oracle 9iFS.

mv

Moves the source file to the destination. If the destination is an existing directory, the source file is moved to the destination directory. If the destination is a file, the source file is renamed to the destination filename. Wildcards are not supported.

Syntax:
mv <source> <destination>
Examples:
mv sample.html sample2.html

Renames sample.html to the sample2.html.

mv specifications.txt testdir/specifications.txt

Moves specifications.txt into testdir.

mv groups.fm documention/groups2.fm

Moves groups.fm into documentation and renames the file to groups2.fm.

put

Stores the specified local file in Oracle 9iFS. If iFSfile is not specified; the file is stored in the current Oracle 9iFS directory. If iFSfile exists, the file is updated according to the versioning semantics.

Syntax:
put <localfile> [<iFSfile>]
Examples:
put sample.html

Stores the local file in the current Oracle 9iFS directory as sample.html.

put sample.html sample2.html

Puts the local file into Oracle 9iFS again, this time storing it as sample2.html.

rm

Removes an object from Oracle 9iFS. If the object is identified by path and the object is not in any other directory, then it is actually deleted from Oracle 9iFS. Otherwise, the object is only deleted from the current directory. If the object value is a directory, by default, the directory must be empty unless the -r (recursive) flag is specified.

Syntax:
rm [<options>] [<object options>] <objectvalue>
Options:

-r

This option causes the recursive removal of a directory and all its contents without prompting.

Object Options:

-path

This is the default option, but can be set explicitly. The object value will be evaluated as a path to an object.

-id

The object value will be evaluated as an ID of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-valuedefault

The object value will be evaluated as the name of a ValueDefault.

-class <classname>

Identifies objects based on the classname and the object value. The object value will be evaluated as a where clause.

Examples:
rm sample.html

Removes sample.html from the current directory.

rm -r a/b/myDir

Removes myDir from b and any items in myDir.

rm -id 1234

Deletes the object identified by the ID, 1234.

rmref

Removes a reference from a directory. The reference is removed only if there exist other references. If it is the last reference, it can only be removed using "rm" (or rm), not rmref. Otherwise, the source is only deleted from the current directory. If the source is a directory, by default, the directory must be empty.

Syntax:
rmref <source>
Examples:
rmref signature.txt

Removes signature.txt from the current directory.

rmref testDir

Removes testDir and all of its contents from the current directory.

cat

Prints an ASCII rendering of the identified object to the screen. For Document and its subclasses, the content of the document's content will be rendered by default. All other objects are rendered as XML by default. For information regarding changing the default rendering behavior, refer to the Oracle Internet File System Developer Reference.

Syntax:
cat [object options] [object value]

or:

type[object options] [object value]
Options:

Object Options:

-path

This is the default option, but can be set explicitly. The object value will be evaluated as a path to an object.

-id

The object value will be evaluated as an ID of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-user

The object value will be evaluated as the name of a Directory User.

-valuedefault

The object value will be evaluated as the name of a ValueDefault.

-class <classname>

Identifies objects based on the classname and the object value. The object value will be evaluated as a where clause.

Listing Options:

-attrall

Renders the effective attributes of the identified object. This option is relevant only when rendering as XML.

Examples:
cat myFile

Displays the contents of myFile.

cat -id 1234

Displays the rendering of the object with ID 1234.

cat -id 1234 -attrall

Renders the effective attribute values of the object identified by the ID 1234. This option is relevant only when the object is rendered as XML.

addref

Adds an item to a directory. The result will be that the source will show up in the destination directory. This does not affect any other directories in which the source may already be in.

Syntax:
addref <filename> <pathDir>
Examples:
addref signature.txt a/oshDir

Adds signature.txt to a/oshDir.

addref oshDir a/oshDir2

Adds oshDir to a/oshDir2.

find

Returns the objects based on the classname and an optional where clause. By default, only the name of the attribute is displayed.

Syntax:
find classname [<whereclause>] [<listing option>]
Options:

Listing Options:

-l

In addition to the name of each file, this option displays the file type, ACLs, owner name, size in bytes, and timestamp (the modification time unless other times are selected).

-attr <attribute list>

Displays the attributes specified for the identified object.

-attrall

Displays all attributes for the identified object.

Examples:
find FOLDER -attrall

Displays all the attributes for all the folders in Oracle 9iFS.

find DOCUMENT "description='FY 2000'" -attrall

Displays all the attributes for the folders with the description "FY 2000".

Miscellaneous Commands

help

Displays help on all commands or on the specified command.

Syntax:
help [cmd]
Examples:
help

Displays usage for all commands.

help cd

Displays the description and command usage for cd.

login/logon

Establishes an Oracle 9iFS session.

Syntax:
login <username/password> or logon <username>/<password>
Example:
login scott/tiger

Logs scott in to Oracle 9iFS.

logout

Terminates the current Oracle 9iFS session.

Syntax:
logout
mode

Sets the modes for the session.

Syntax:
ifsmode <modetype> [<object options>] <object value>
Options:

Mode Types:

acl

When creating new objects, sets the ACL for new objects to the ACL specified. The ACL can also be specified with the -parent or the -profile option.

dateformat

Sets the format for dates. The object value is a date format.

parse

Sets the parse mode (on/off). The object value is a boolean value.

delimiter

Sets the folder path delimiter. The object value is a string representing the folder path delimiter.

language

Sets the language to be set on uploaded documents. The object value is the language name.

charset

Sets the character set to be set on uploaded documents. The object value is IANA character set name.

admin

Turns admin mode on or off.

Object Options:

-id

The object value will be evaluated as an ID of an object.

-systemacl

The object value will be evaluated as the name of a SystemAccessControlList.

-profile

Sets the ACL mode to take the ACL from the user profile.

-parent

Sets the ACL mode to take the ACL from the parent directory.

Boolean Values:

The following Boolean values are valid:

Examples:
ifsmode acl -id 1234

Sets the default ACL to be an ACL identified by ID 1234.

mode acl -profile

Sets the default ACL to be taken from the user profile.

mode acl -parent

Sets the ACL determination to be taken from the parent folder.

mode parse off

Sets the parse mode to off, so that files put in Oracle 9iFS are not parsed.

mode acl

Sets the default ACL to be determined from the system.

mode acl -systemacl Published

Sets the default ACL to be Published.

mode dateformat "MMM dd HH:mm"

Sets the date format to "MMM dd HH:mm".

mode admin true

Turns admin mode on for the current session.

mode delimiter \

Sets the folder path delimiter to \.

whoami

Displays the current user.

Syntax:
whoami
Example:
whoami

Displays the name of the user that is currently logged in.

ascii

Changes to ascii mode.

Syntax:
ascii
bin

Changes to binary mode.

Syntax:
bin
version

Displays the Oracle Internet File System version information.

Syntax:
version
shell

Starts the Command Line Utilities shell. If no arguments are specified, an interactive shell is started.

Syntax:
shell [-i <filename>]
Options:

-i

Indicates a file containing Command Line Utilities commands. This will run all the commands in a single JVM.

Examples:
shell

Starts up an interactive shell that takes in Command Line Utilities commands.

shell -i batchcommands.txt

Reads in the commands from the input file, batchcommands.txt, and runs them.

Globalization Support Commands

showchar

Shows the character set for this session.

Syntax
showchar
Example:
showchar

Character Set: UTF-8

setchar

Sets the character set for this session. Documents inserted using this CUP session will have its attributes set to this character set.

Syntax
setchar [IANA charset name]
Example:
setchar UTF-8

Sets to UTF-8 for this session.

showlang

Shows the language for this session.

Syntax
showlang
Example:
showlang

Displays the language for this CUP session.

setlang

Sets the language for this session. Documents inserted using this CUP session will be indexed in this language.

Syntax
setlang
Example:
setlang French

Sets the language for this CUP session to French.


Go to previous page Go to next page
Oracle
Copyright © 1999, 2002 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents
Contents
Go To Index
Index