VI EDITOR COMMANDS



General Startup

To use vi : vi filename
To exit vi: and save changes: ZZ   or  :wq
To exit vi: without saving changes: :q!
To enter vi: command mode: [esc]


Counts
        A number preceding any vi command tells vi to repeat  that command that many times.

Cursor Movement

h       move left (backspace)

j       move down

k       move up

l       move right (spacebar)

[return]   move to the beginning of the next line

$       last column on the current line

0       move cursor to the first column on the  current line

^       move cursor to first nonblank column on the  current line

w       move to the beginning of the next word or  punctuation mark

W       move past the next space

b       move to the beginning of the previous word or punctuation mark

B       move to the beginning of the previous word, ignores punctuation

        e       end of next word or punctuation mark

        E       end of next word, ignoring punctuation

        H       move cursor to the top of the screen

        M       move cursor to the middle of the screen

        L       move cursor to the bottom of the screen


Screen Movement

       G        move to the last line in the file

       xG       move to line x

       z+       move current line to top of screen

       z        move current line to the middle of screen

       z-       move current line to the bottom of screen

       ^F       move forward one screen

       ^B       move backward one line

       ^D       move forward one half screen

       ^U       move backward one half screen

       ^R       redraw screen  ( does not work with VT100 type terminals )

       ^L       redraw screen  ( does not work with Televideo terminals )

Inserting

       r        replace character under cursor with next  character typed

       R        keep replacing character until [esc] is hit

       i        insert before cursor

       a        append after cursor

       A        append at end of line

       O        open line above cursor and enter append mode

Deleting

x       delete character under cursor

dd      delete line under cursor

        dw      delete word under cursor

        db      delete word before cursor

Copying Code

        yy      (yank)'copies' line which may then be put by  the p(put) command. Precede with a count for
multiple lines.

Put Command
        brings back previous deletion or yank of lines,  words, or characters

        P       bring back before cursor

        p       bring back after cursor

 Find Commands

?       finds a word going backwards

/       finds a word going forwards

        f       finds a character on the line under the  cursor going forward

        F       finds a character on the line under the  cursor going backwards

        t       find a character on the current line going  forward and stop one character before it

T       find a character on the current line going  backward and stop one character before it
; repeat last f, F, t, T

Miscellaneous Commands

. repeat last command

u undoes last command issued

U undoes all commands on one line

xp deletes first character and inserts after  second (swap)

J join current line with the next line

^G display current line number

% if at one parenthesis, will jump to its mate

mx mark current line with character x

'x find line marked with character x

NOTE: Marks are internal and not written to the file.

Line Editor Mode
Any commands form the line editor ex can be issued  upon entering line mode.

To enter: type ':'

To exit: press[return] or [esc]

ex Commands
For a complete list consult the  UNIX Programmer's Manual

READING FILES
copies (reads) filename after cursor in file  currently editing
:r filename

WRITE FILE
:w  saves the current file without quitting

MOVING

:# move to line #

:$ move to last line of file

SHELL ESCAPE
executes 'cmd' as a shell command.

:!'cmd'
========================================================================

A quick reference list of vi editor commands

Notes:
<ESC> denotes the Esc key, and <CR> denotes the Enter key. 

The expression <cmd>  means that you should enter a command, <f>  means that you should enter a filename, and <x> means that you should enter a character or number. 

The symbol  ^  (caret) means that you should hold down the Ctrl key while pressing the indicated letter.

Vi editor command keys:

  ZZ      Exit, saving changes           t<x>   Up to <x> forward
  Q       Enter ex mode                  T<x>   Back up to <x>
  <ESC>   End of insert                  <x>|   Go to column <x>
  :<cmd>  Execute ex command             w,W    Forward one word
  :!<cmd> Shell command                  b,B    Back one word
  ^g      Show filename/size             e,E    End of word
  ^f      Forward one screen             ^h     Erase last character
  ^b      Back one screen                ^w     Erase last word
  ^d      Forward half screen            ^?     Interrupt
  ^u      Backward half screen           ~      Toggle character case
  <x>G    Go to line <x>                 a      Append after
  /<x>    Search forward for <x>         i,I    Insert before
  ?<x>    Search backward for <x>        A      Append at end of line
  n       Repeat last search             o      Open line below
  N       Reverse last search            O      Open line above
  ]]      Next section/function          r      Replace character
  [[      Previous section/function      R      Replace characters
  %       Find matching () { or }        d      Delete
  ^l      Redraw screen                  dd     Delete line
  ^r      Refresh screen                 c      Change              
  z<CR>   Current line at top            y      Yank lines to buffer
  z-      Current line at bottom         C      Change rest of line 
  ^e      Scroll down one line           D      Delete rest of line 
  ^y      Scroll up one line             s      Substitute character
  ``      Previous context               S      Substitute lines    
  H       Home window line               J      Join lines          
  L       Last window line               x      Delete after        
  M       Middle window line             X      Delete before       
  +       Next line                      Y      Yank current line   
  hjkl    Cursor movement:               p      Put back lines      
          left/down/up/right             P      Put before          
  0       Beginning of line              <<     Shift line left     
  $       End of line                    >>     Shift line right    
  f<x>    Find <x> forward               u      Undo last change    
  F<x>    Find <x> backward              U      Restore current line

Ex mode commands:

  q       Quit                        set <x>   Enable option
  q!      Quit, discard changes       set no<v> Disable option
  r <f>   Read in file <f>            set all   Show all options
  sh      Invoke shell
  vi      Vi mode
  wq      Write and quit
  w <f>   Write file <f>
  w! <f>  Overwrite file <f>

Options:

  autoindent      Automatic line indentation
  autowrite       Write before quit
  ignorecase      Ignore case in searches
  number          Display line numbers
  showmatch       Show matches to ) and } as typed
  terse           Quiet mode
  wrapscan        Wraparound in searches
  wrapmargin      Automatic line splitting

Test Your weblogic knowledge



WebLogic Interview and Certification Questions        

1) Oracle WebLogic Server 10.3.1 is certified with JDK 1.6.

1. True
2. False

2) Net installer is preferred over the package installer if you want  to install select components using only the Custom option and have access to the Internet.
1. True
2. False

3) Which JDK does Oracle WebLogic Server 10.3.1 come bundled with for a Linux platform?
1. Sun SDK 1.6
2. JRockit SDK 1.6
3. Both

4) Which directory within a domain directory is used to maintain its  configuration repository?
1. /console
2. /cache
3. /config
4. /logs
5. /AdminServer

5) Invoke the Domain Configuration Wizard by using _____.
1. config.sh under <WL_HOME>/common/bin
2. config_builder.sh under <WL_HOME>/common/bin

6) What is the main configuration file for the domain called?
1. configuration.xml
2. wlsconfig.xml
3. wls.xml
4. config.xml

7) You can use boot identity files to start the following without being prompted for the administrator username and password.
1. Managed servers
2. Administration server
3. Both

8 ) Which of the following statements is NOT true?
1. Managed servers in a domain may run a different OS version of Oracle WebLogic Server (for example, Windows + Linux).
2. A domain comprises only the administration server, only the managed server, or the administration and managed servers.
3. The administration server stores the configuration information and logs for a domain.
4. The administration server in a domain must run the same or later version number of Oracle WebLogic Server as the managed servers in the domain.

9) Where are all users, groups, and roles stored by default?
1. Oracle Database
2. PointBase Database
3. Oracle Internet Directory
4. LDAP store of the administration server

10) Invoke the Template Configuration Wizard using _____.
1. config.sh under <WL_HOME>/common/bin
2. config_builder.sh under <WL_HOME>/common/bin

11) When you create a new domain to automatically support Oracle WebLogic Server, which template is it based on by default?
1. wlst.jar
2. ws.jar
3. web_server.jar
4. server.jar
5. wls.jar

12) Which of the following can you use to create a domain template:
1. The pack command
2. config_temp.sh
3. The Administration Console
4. config_builder.sh
5. The WLST offline command-line tool

13) Which link would you click in the console to add or remove columns to or from a monitoring page?
1. Customize this table
2. Change Monitoring View
3. Update Columns
4. Manage Preferences

14) WLST communicates with Oracle WebLogic Server’s ____ to retrieve and update resources on a running server.
1. Templates
2. Logs
3. Mbeans
4. Scripts

15) The ______ panel in the Administration Console uses a tree to represent your domain resources.
1. Preferences
2. Domain Structure
3. How do I?
4. Change Center

16) The Administration Console is unavailable if the administration server is shut down.
1. True
2. False

17) Both the administration server and the managed servers can be started by using the Administration Console.
1. True
2. False

18) Using WLST’s _____ mode, you can supply commands one at a time and get immediate feedback.
1. Management
2. Operational
3. Sequential
4. Template
5. Interactive

19) Under the servers directory of WLS domain, there are subdirectories for administration and managed servers. The servers directory contains one subdirectory for each WebLogic Server instance in the domain. If you do not see the subdirectory for each WebLogic Server instance in your domain, it means that:
1. The WebLogic Server instance is not correctly configured.
2. The patch level is not correct.
3. The administration server is unable to communicate with the managed servers.
4. The WebLogic Server instance has not been started since it was created.

20) Which of the following will happen if you run startWebLogic.sh without any options?
1. It invokes java weblogic.Server.
2. It starts the managed servers associated with the administration server.
3. It sets the environment using setDomainEnv.sh.
4. It starts the administration server.

21) Which of the following options would you use to create a managed server?
1. Domain Configuration Wizard
2. Administration Console
3. Command line (WLST)

22) Which of the following is true when the administration server is down?
1. Domain log entries are unavailable.
2. Managed servers can start in MSI mode.
3. The Administration Console and management tools are unavailable.
4. At boot time, managed servers read a local copy of config.xml, SerializedSystemIni.dat, and boot.properties (optional).
5. You cannot change the configuration of the managed servers that are running in MSI mode until communication with the administration server is restored.
6. The Node Manager can start the managed servers in MSI mode.

23) You can start a managed server using WLST and without using a Node Manager.
1. True
2. False

24) Which of the following statements is true?
1. There is one Node Manager for each machine.
2. There is one Node Manager for each domain.
3. There is one Node Manager for each cluster.

25) To start a managed server using the Administration Console, a Node Manager must be configured on the machine where the managed server resides.
1. True
2. False

26) Which is NOT a standard severity level for Oracle WebLogic Server log messages?
1. Debug
2. Transaction
3. Info
4. Notice
5. Error

27) Which environment supports FastSwap?
1. Production mode, archived files
2. Production mode, expanded files
3. Development mode, archived files
4. Development mode, expanded files
5. All of the above

28) What is the web.xml tag indicating the test point for testing applications?
1. <welcome-file>
2. <test-point>
3. <deploy>
4. <monitor>
5. <debug>

29) It is possible to deploy an exploded directory that contains JAR files.
1. True
2. False

30) A ____________ is a reusable Oracle WebLogic Server application that can be referenced by other deployed applications.
1. Java library
2. Shared library
3. Web library
4. Composite library
5. Reference library

31) Which of the following is NOT a supported type of application in Oracle WebLogic Server?
1. Enterprise application
2. EJB application
3. Process application
4. Web service application
5. Web application

32) Which of the following are valid Oracle WebLogic Server deployment descriptor files for configuring applications?
1. weblogic-webapp.xml
2. weblogic-ejb-jar.xml
3. weblogic.xml
4. weblogic-application.xml
5. weblogic-library.xml

33) Which of the following is NOT true about the deployment plans in Oracle WebLogic Server?
1. Overrides values in application descriptors
2. Can be created by Oracle WebLogic Server during deployment
3. Is packaged within an application archive
4. Is an XML file
5. Can be created with weblogic.PlanGenerator

34) When an application is in the ___________ state, it is distributed to the servers, but is not yet available to clients:
1. Activated
2. Staged
3. Targeted
4. Prepared
5. Loaded

35) Name four techniques or tools that can be used to deploy new applications to Oracle WebLogic Server.
1. Administration Console
2. WLST
3. weblogic.PlanGenerator
4. weblogic.Deployer
5. JMS
6. Autodeployment

36) Which of the following is NOT an available configuration attribute for a JDBC data source?
1. Host name
2. Queue size
3. Test frequency
4. Initial capacity
5. Capacity increment

37) Which are the two levels of data sources available in Oracle WebLogic Server?
1. Connection
2. Web
3. Application
4. Process
5. System

38) Client applications look up data sources from the local server’s ___________ tree:
1. Application
2. Web
3. LDAP directory
4. JNDI
5. System

39) Which are the correct messaging model and JMS destination type associations?
1. Queue: Publish/Subscribe
2. Queue: Point-to-Point
3. Topic: Publish/Subscribe
4. Topic: Point-to-Point

40) Which are the available resource types within an Oracle WebLogic Server JMS module?
1. Connection factory
2. Queue
3. Topic
4. Server
5. Store

41) Which of the following is a benefit of multitier cluster architecture?
1. Requires fewer servers compared to the basic architecture
2. Possibility to load-balance method calls to clustered EJBs
3. Easier security implementation
4. None

42) In a multitier cluster architecture where you want to load-balance EJB objects, you configure them:
1. Within one cluster
2. In different clusters
3. Along with the Web-tier clients in the same server
4. In different domains

43) Which of the following is NOT an available configuration attribute associated with Oracle WebLogic Cluster?
1. Messaging mode
2. Multicast TTL
3. Multicast port
4. Broadcast server

44) Select all valid values for the persistent store type element in weblogic.xml.
1. file
2. Replicated
3. Unicast
4. async-replicated-if-clustered
5. Jdbc
6. async-wan

45) Which two Oracle WebLogic Server features can be used to control the destination servers that are used for in-memory replication?
1. Web service
2. Replication group
3. Data source
4. Node Manager
5. Machine

46) Which of the following terms is NOT associated with in-memory replication?
1. Cookie
2. Secondary
3. Session
4. Schema
5. Primary
6. Synchronous

47) Which types of replication configuration are allowed for EJBs?
1. JDBC
2. File
3. InMemory
4. None

48) The Hostname Verifier is one measure for combating this type of attack:
1. Large buffer
2. Connection starvation
3. Man in the middle
4. User lockout

49) To counter connection starvation attacks, you can set:
1. Max Post Size
2. Post Timeout
3. Hostname Verifier
4. User lockout

50) What mode must the Middleware software be in to perform a full backup?
1. Online
2. Offline
3. Either online or offline
4. Neither. A full backup is technically impossible.

51) What is another name for an inconsistent backup?
1. Hot
2. Cold
3. Either online or offline
4. Broken. If it is inconsistent, there is something wrong with it.

52) When making a TAR backup in UNIX, what is a key point to remember?
1. Make it from the lowest directory possible, as far from root as practical.
2. Make sure that you perform the backup signed on as the owner of the Middleware Home directory.
3. Make sure that you preserve the original owner, group, and permissions.
4. Make sure that all Middleware processes are stopped.

53) The configuration archive is enabled by default.
1. True
2. False

54) What happens if you have a backup administration server?
1. You are allowed to have only one administration server. If it fails, the managed servers run in MSI mode until your one administration server comes back.
2. It runs simultaneously with the primary administration server in a load-sharing mode.
3. It can run in a warm standby keeping itself in sync with the main administration server.
4. It must be in cold standby and you have to sync it with the main administration server manually.
1) Name three capabilities of Smart Update.
a. Update a domain’s configuration.
b. Download a maintenance pack.
c. Apply a product patch.
d. Add a patch to the server classpath.
e. Create a domain from a template.

2) What file is responsible for including patch JAR files in the  server classpath?
a. nodemanager.properties
b. weblogic_patch.jar
c. maintenance.jar
d. setWLSEnv.sh
e. boot.properties

3) Which of the following is NOT a feature of domain templates?
a. SQL scripts
b. Start menu entries
c. Email notifications
d. Variable replacement

4) Which two types of domain resources are NOT included in an extension template?
a. Data Source
b. Cluster
c. Application
d. JMS Module
e. Server

5) What tool is used to create managed server templates?
a. Template Builder
b. Configuration Wizard
c. ConfigToScript
d. Pack

6) What WLST command is used to apply an extension template to an existing domain?
a. extendDomain
b. addTemplate
c. importToDomain
d. applyAll

7) Which of the following is NOT a use of network channels?
a. Entitle application users
b. Open multiple ports on a single server
c. Dedicate a port to administration traffic
d. Maintain separate settings for multiple network interfaces

8 ) Name three protocols that you can assign to a network channel.
a. ORCL
b. T3
c. HTTPS
d. VNC
e. ADMIN

9) Which of the following is a data source attribute associated with connection testing?
a. Test Statement
b. Test Capacity
c. Test Table Name
d. Test LLR

10) Name three attributes used to configure a multi data source.
a. Statement Cache Type
b. Logging Last Resource
c. Algorithm Type
d. Failover Request if Busy
e. JNDI Name

11) What data source attribute affects the growth of the connection pool size at run time?
a. Capacity Increment
b. Algorithm Type
c. Cache Size
d. Pinned To Thread

12) Name two values that the Statement Cache Type attribute supports?
a. LRU
b. Shrink
c. Pinned
d. Fixed

13) Name four JMS management operations available in WLS.
a. View the contents of a message
b. Encrypt the contents of a message
c. Add a message to a destination
d. Pause the production of messages of a destination
e. Move a message to another destination

14) Name three types of operations that can be individually paused on a JMS destination.
a. Insertion
b. Consumption
c. Presumption
d. Transaction
e. Production

15) Which of the following is true about JDBC stores?
a. The store does not require a separate data source.
b. Store DDL files must be placed in your domain.
c. Each store must use a dedicated table.
d. JMS connection factories must specify a client ID.

16) Which two values can the Delivery Mode message header be set to?
a. Non-persistent
b. At-most-once
c. Exactly-once
d. Persistent

17) Name the two types of blocking policies for JMS quotas.
a. Preemptive
b. FIFO
c. Throttled
d. LRU
e. Acknowledge

18) What WLS JMS feature can be used to guarantee the sequence in which messages are consumed?
a. Imported Destination
b. Quota Blocking Policy
c. Unit of Order
d. Scan Expiration Interval

19) Which of the following is NOT a type of resource associated with JMS store and forward?
a. Remote context Y
b. Imported destinations Y
c. Error handling Y
d. Agent Y
e. Adapter

20) Which of these is an available attribute for a Remote SAF Context resource?
a. Local JNDI Name
b. URL
c. Agent Type
d. Time-to-Live

21) How many JMS bridge adapters ship with WebLogic Server?
a. 0
b. 1
c. 2
d. 3
e. 4

22) Which of these is an available Message Bridge attribute?
a. XA Enabled
b. Connection URL
c. Local JNDI Name
d. Quality of Service

23) Who in a cluster is responsible for initiating an automatic whole server migration?
a. Node Manager
b. Database procedure
c. Cluster Master
d. Migratable target

24) What type of leasing basis does not employ a database?
a. Exactly-once
b. WAN
c. Migratable
d. Consensus

25) Name three types of server resources that can be targeted to a migratable target.
a. Diagnostic module
b. Persistent store
c. Web application
d. SAF agent
e. JMS server

26) Which of the following is NOT taken into account when load balancing JMS clients?
a. Number of consumers
b. Server affinity
c. Migratable target
d. Transaction affinity
e. No persistent store

27) Which types of WebLogic Server session persistence require a database?
a. Memory
b. MAN
c. WAN
d. Cookie
e. JDBC

28) Which of these is a required cluster attribute for cross-cluster replication?
a. Remote Cluster Address
b. Migration Basis
c. Client ID
d. Candidate Machines

29) Name four authentication providers supplied with WebLogic Server.
a. LDAP Authenticator
b. Principal Authenticator
c. OpenLDAP Authenticator
d. SQL Authenticator
e. Custom DBMS Authenticator
f. Schema Authenticator

30) Which of the following is NOT an available authentication provider control flag?
a. SUFFICIENT
b. REQUISITE
c. OPTIONAL
d. ALWAYS
e. REQUIRED

31) What two values can the Group Membership Searching authentication provider attribute be set to?
a. Unlimited
b. Restricted
c. Limited
d. Subtree

32) Name three components of the The Grinder tool.
a. Proxy
b. Agent
c. Profiler
d. Chunk
e. Console

33) What term refers to garbage collection algorithms that are based on object age?
a. Heaping
b. Timed
c. Generational
d. Precompiled

34) Which of the following is NOT a type of work manager request class?
a. Context
b. Fair Share
c. Response Time
d. Cluster

35) Name four tools that can be used to monitor WLS.
a. FMW Control
b. WLST
c. SWSS
d. WLDF
e. NMP

36) What WLST command is necessary to monitor the health or performance of WLS resources?
a. serverConfig()
b. redeploy()
c. startEdit()
d. serverRuntime()
e. validate()

37) Which of the following is NOT an available action for a WLDF monitor (instrumentation)?
a. Trap Destination
b. Stack Dump
c. Elapsed Time
d. Display Arguments
e. Thread Dump

38) Which of the following is NOT a configuration attribute for WLS SNMP agents?
a. Trap Version
b. Data Source
c. Community Prefix
d. Inform Enabled
e. Engine ID