Oracle Internet File System Setup and Administration Guide
Release 1.1

A81197-05

Library

Solution Area

Contents

Index

Prev Next

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, ifscat "test document" or ifsls "backup folder 1999"or ifsls -class Document "name='Mydoc'".

Topics include:

Command Line Utilities: An Overview

The Command Line Utilities are automatically installed into $ORACLE_HOME/ifs<version>/bin on the server machine where Oracle iFS is installed. The Command Line Utilities can also be installed on any UNIX or Windows NT client machine.


Note:

To use the Command Line Utilities, the CUP server must be running. 


Setting Environment Variables to Run the Command Line Utilities

The Command Line Utilities use three environment variables. Two of these variables are set at install time in the ifscmdenv file located in the following directory:

Platform  Directory 

UNIX 

$ORACLE_HOME/ifs<version>/bin 

Windows NT 

%ORACLE_HOME%\ifs<version>\bin 

You can modify this script to change any of the install defaults.

When the Command Line Utilities are installed on a client machine, the variables in this script (which is ifscmdenv.bat if installed on a Windows machine) will need to be modified since the utilities are no longer running on the same machine as the Command Line Utility Protocol Server.

You can also set these environment variables directly on the command line itself, or in your local environment script, for example, the .cshenv file if you use csh.

Variables

IFS_COOKIE_DIRECTORY--The session information for the Command Line Utilities is maintained in the IfsCookie file, which is generated each time a user logs in. This variable specifies where this file should be placed on the local system. By default, this directory is set to $ORACLE_HOME/ifs<version>/log. This default should be changed if either of the following cases is true:

IFS_CUP_SERVER--If this variable is not set, it defaults to localhost. This default will only work if the user is using the Command Line Utilities against a Command Line Utility Protocol Server (CUP) on the same machine. To access a different instance of the server other than localhost, set this variable to the appropriate server, for example, ifstestmachine. This variable will always need to be set when running the Command Line Utilities on a client machine since the Command Line Utility Protocol Server (CUP) will not be locally available.

IFS_CUP_PORT--All Oracle iFS commands access the CUP using the default port, 4180. If the CUP server is started on a port other than 4180, this variable should be set to that port number. For example, if you start the CUP on 4182, this variable should be set to 4182.

See Also

For more information on installation of the Command Line Utilities, see the Oracle Internet File System Installation Guide.

Running the Command Line Utilities

There are four different ways to run the Command Line Utilities:

  1. On the Command Line.

    Depending on your operating system, there are .bat or .sh (Windows NT and Unix, respectively) that run individual Command Line Utilities commands. These files are located in the following directory:

    Platform  Directory 

    UNIX 

    $ORACLE_HOME/ifs<version>/bin 

    Windows NT 

    %ORACLE_HOME%\ifs<version>\bin 

    For example, ifslogin.bat is used on Windows NT as ifslogin tuser1/tuser1.

  2. In an interactive 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>.

  3. In a batch mode.

    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.

  4. In scripts.

    Use any commands in a script, just as you would from the operating system command line. For example, a .bat or .sh file.

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. To use the Command Line Utilities, the Command Line Utilities Protocol (CUP) server needs to be started. You can do this using Server Manager.

Starting the Command Line Utilities

Use Server Manager to start the Command Line Utilities protocol server. From your operating system, you can log on by using the ifslogin command.

Navigation Commands

The following commands are used for navigation throughout Oracle iFS.

ifscd

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 iFS. The default home directory is /home/<username>.

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

Changes the current working directory to /osh.

ifscd

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

ifscd ..

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

ifspwd

Displays the current working directory in Oracle iFS.

Syntax:
ifspwd
Example:
ifspwd /home/scott

Displays the current directory, /home/scott.

File Manipulation Commands

ifscp

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:
ifscp <source> <destination>
Examples:
ifscp specifications.doc /osh/specifications2.doc

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

ifscp specifications.doc /osh

Copies specifications.doc to /osh.

ifsget

Renders the file to the specified local directory.

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

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

ifsgetattr

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

Syntax:
ifsgetattr [<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. 

-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. 

Listing Options:

Examples:
ifsgetattr signature.txt

Displays all attributes for signature.txt.

ifsgetattr signature.txt -attr owner acl creationDate

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

ifsgetattr -id 1234 -attrall

Displays all attributes for the object identified by ID 1234.

ifsmkdir

Creates a directory with the specified name.

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

-p 

Creates the complete directory path. 

Examples:
ifsmkdir testDir

Creates testDir in the current directory.

ifsmkdir -p a/b/testDir

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

ifssetattr

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:
ifssetattr [<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:
ifssetattr -id 1234 owner -avuser scott

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

ifssetattr -user scott description "System Administrator"

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

ifsshowallpaths

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

Syntax:
ifsshowallpaths [<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:
ifsshowallpaths signature.txt

Displays all folder references to signature.txt.

ifsshowallpaths -id 1234

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

ifsls

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:
ifsls [<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:
ifsls

Lists the names of the items in the current directory.

ifsls osh

Lists the names of the items in the osh directory.

ifsls -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.

ifs -class DOCUMENT -attr name description

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

ifsmv

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:
ifsmv <source> <destintaion>
Examples:
ifsmv sample.html sample2.html

Renames sample.html to the sample2.html.

ifsmv specifications.txt testdir/specifications.txt

Moves specifications.txt into testdir.

ifsmv groups.fm documention/groups2.fm

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

ifsput

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

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

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

ifsput sample.html sample2.html

Updates sample2.html with the local file, sample.html following versioning semantics.

ifsrm

Removes an object from Oracle iFS. If the object is identified by path and the object is not in any other directory, then it is actually deleted from Oracle iFS. 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:
ifsrm [<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. 

-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:
ifsrm sample.html

Removes sample.html from the current directory.

ifsrm -r a/b/myDir

Removes myDir from b and any items in myDir.

ifsrm -id 1234

Deletes the object identified by the ID, 1234.

ifsrmref

Removes a reference from a directory. If the source is not in any other directory, then it is actually deleted from Oracle iFS. Otherwise, the source is only deleted from the current directory. If the source is a directory, by default, the directory must be empty unless the -r (recursive) flag is specified.

Syntax:
ifsrmref [-r] <source>
Options:

-r 

This option removes a directory and all of its contents from the current directory without prompting. 

Examples:
ifsrmref signature.txt

Removes signature.txt from the current directory.

ifsrmref -r testDir

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

ifscat

Prints an ASCII rendering of the identified object to the screen. For Document and its subclasses, the content of the document will be rendered by default. Folders and its subclasses are not rendered. All other objects are rendered as XML by default. For information regarding changing the default rendering behavior, refer to Oracle iFS documentation.

Syntax:

ifscat [object options] [object value] or ifstype

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. 

Examples:
ifscat myFile

Displays the contents of myFile.

ifscat -id 1234

Displays the rendering of object with ID 1234.

ifsaddref

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:
ifsaddref <filename> <pathDir>
Examples:
ifsaddref signature.txt a/oshDir

Adds signature.txt to a/oshDir.

ifsaddref oshDir a/oshDir2

Adds oshDir to a/oshDir2.

ifsfind

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

Syntax:
ifsfind classname [<whereclause>] [<listing option>]
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. 

Listing Options:

Examples:
ifsfind FOLDER -attrall

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

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

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

Miscellaneous Commands

ifshelp

Displays help on all commands or on the specified command.

Syntax:
ifshelp [cmd]
Examples:
ifshelp

Displays usage for all commands.

ifshelp cd

Displays the description and command usage for cd.


Note:

The command is cd not ifscd


ifslogin/ifslogon

Establishes an Oracle iFS session.

Syntax:
ifslogin <username/password> or ifslogon <username>/<password>
Example:
ifslogin scott/tiger

Logs scott in to Oracle iFS.

ifslogout

Terminates the current Oracle iFS session.

Syntax:
ifslogout
ifsmode

Sets the modes for the session.

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

Mode Types:

admin 

Sets the administration mode (on/off). The object value is a Boolean value. 

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. 

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. 

-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 admin T

Sets administration mode on.

ifsmode admin off

Sets administration mode off.

ifsmode -name Private

Sets the default ACL to the Private ACL.

ifsmode acl -id 1234

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

ifsmode acl -profile

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

ifsmode acl -parent

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

ifsmode parse off

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

ifssu

Allows user to impersonate another user without logging off. The command with a username impersonates that user. The command without arguments reverts back to the original user. Only users with administration permissions can use this command.

Syntax:
ifssu [<username>]
Examples:
ifsu jsmith

Impersonates the user jsmith.

ifsu

Cancels the impersonation command.

ifswhoami

Displays the current user.

Syntax:
ifswhoami
Example:
ifswhoami

If a user has logged in, that user is displayed.

ifsascii

Changes to ascii mode.

Syntax:
ifsascii
ifsbin

Changes to binary mode.

Syntax:
ifsbin
ifsversion

Displays the Oracle iFS version information.

Syntax:
ifsversion
ifsshell

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

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

-i 

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

Examples:
ifsshell

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

ifsshell -i batchcommands.txt

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

National Language Support Commands

ifsshowchar

Shows the character set for this session.

Syntax
ifsshowchar
Example:
ifsshowchar

Character Set: UTF-8

ifssetchar

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

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

Sets to UTF-8 for this session.

ifsshowlang

Shows the language for this session.

Syntax
ifsshowlang
Example:
ifsshowlang

Displays the language for this CUP session.

ifssetlang

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

Syntax
ifssetlang
Example:
ifssetlang French

Sets the language for this CUP session to French.


Prev Next
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Library

Solution Area

Contents

Index