Oracle Internet File System Setup and Administration Guide Release 1.1 A81197-05 |
|
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:
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.
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 |
|
Windows NT |
|
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
.
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_COOKIE_DIRECTORY
set to the same local directory, and are logged in at the same time, the IfsCookie
file will be overwritten by the most recent user's credential information. This means that both users will have the most recent user's permissions, and any action either user takes will affect both users.
IfsCookie
file exists, which is only during the life of a user's logon, anyone who has access to the directory containing the IfsCookie
file could potentially use that cookie to logon as the already logged on user. If security is a concern, it is highly recommended that the IFS_COOKIE_DIRECTORY
be changed from the default, since $ORACLE_HOME/ifs<version>/log
is a commonly known directory. CUP commands will not work without setting the IFS_COOKIE_DIRECTORY
.
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.
For more information on installation of the Command Line Utilities, see the Oracle Internet File System Installation Guide.
There are four different ways to run the Command Line Utilities:
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 |
|
Windows NT |
|
For example, ifslogin.bat
is used on Windows NT as ifslogin tuser1/tuser1
.
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
.
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.
Use Server Manager to start the Command Line Utilities protocol server. From your operating system, you can log on by using the ifslogin
command.
The following commands are used for navigation throughout Oracle iFS.
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>
.
ifscd <directory>
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.
Displays the current working directory in Oracle iFS.
ifspwd
ifspwd /home/scott
Displays the current directory, /home/scott
.
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.
ifscp <source> <destination>
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
.
Renders the file to the specified local directory.
ifsget <iFSfile> <localfile>
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
.
Display the attributes of an object. By default, all attributes are displayed.
ifsgetattr [<object options>] <objectvalue> [<listing options>]
Object Options:
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.
Creates a directory with the specified name.
ifsmkdir [<options>] <directory>
|
Creates the complete directory path. |
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.
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.
ifssetattr [<object options>] <objectvalue> <attrname> [<attr options>] [<attrvalue>]
Object Options:
Attribute Options:
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.
Displays all folder references to the specified object. The specified object must be a Public Object.
ifsshowallpaths [<object options>] <objectvalue>
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.
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.
ifsls [<options>] [<objectvalue>] [<listing options>]
Object Options:
Listing Options:
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.
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.
ifsmv <source> <destintaion>
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
.
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.
ifsput <localfile> [<iFSfile>]
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.
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.
ifsrm [<options>] [<object options>] <objectvalue>
-r |
This option causes the recursive removal of a directory and all its contents without prompting. |
Object Options:
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.
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.
ifsrmref [-r] <source>
|
This option removes a directory and all of its contents from the current directory without prompting. |
ifsrmref signature.txt
Removes signature.txt
from the current directory.
ifsrmref -r testDir
Removes testDir
and all of its contents from the current directory.
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.
ifscat [object options] [object value]
or ifstype
Object Options:
ifscat myFile
Displays the contents of myFile
.
ifscat -id 1234
Displays the rendering of object with ID 1234.
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.
ifsaddref <filename> <pathDir>
ifsaddref signature.txt a/oshDir
Adds signature.txt
to a/oshDir
.
ifsaddref oshDir a/oshDir2
Adds oshDir
to a/oshDir2
.
Returns the objects based on the classname and an optional where clause. By default, only the name of the attribute is displayed.
ifsfind classname [<whereclause>] [<listing option>]
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"
.
Displays help on all commands or on the specified command.
ifshelp [cmd]
ifshelp
Displays usage for all commands.
ifshelp cd
Displays the description and command usage for cd
.
Establishes an Oracle iFS session.
ifslogin <username/password> or ifslogon <username>/<password>
ifslogin scott/tiger
Logs scott in to Oracle iFS.
Terminates the current Oracle iFS session.
ifslogout
Sets the modes for the session.
ifsmode <modetype> [<object options>] <object value>
Mode Types:
Object Options:
The following Boolean values are valid:
true
, t
, on
, 1
, y
, and yes
are legal true values.
f
, off
, 0
, n
, and no
are legal false values.
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.
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.
ifssu [<username>]
ifsu jsmith
Impersonates the user jsmith.
ifsu
Cancels the impersonation command.
Displays the current user.
ifswhoami
ifswhoami
If a user has logged in, that user is displayed.
Changes to ascii mode.
ifsascii
Changes to binary mode.
ifsbin
Displays the Oracle iFS version information.
ifsversion
Starts the Command Line Utilities shell. If no arguments are specified, an interactive shell is started.
ifsshell [-i <filename>]
|
Indicates a file containing Command Line Utilities commands. This will run all the commands in a single JVM. |
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.
Shows the character set for this session.
ifsshowchar
ifsshowchar
Character Set: UTF-8
Sets the character set for this session. Documents inserted using this CUP session will have its attributes set to this character set.
ifssetchar [IANA charset name]
ifssetchar UTF-8
Sets to UTF-8 for this session.
Shows the language for this session.
ifsshowlang
ifsshowlang
Displays the language for this CUP session.
Sets the language for this session. Documents inserted using this CUP session will be indexed in this language.
ifssetlang
ifssetlang French
Sets the language for this CUP session to French.
|
Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|