locate SnmpManagerConfig.groovy
Will search for the file and display its directory.
tail -f NameOfLogFile.log tail -f NameOfLogFile.log | grep 'myKeyword' The following command is used to search all SnmpManager.log files in the current directory for the term 'myNetworkElement'. The results are then inputted into the text file 'myOutput.txt'.
cat SnmpManager.log* | grep 'myNetworkElement' > myOutput.txt
Vi has 2 modes:
1. Command Mode - commands which cause action to be taken on the file 2. Insert Mode - where text is inserted into the file
ESC key turns off insert mode
Exiting Vi
:x <Return> - quit vi, writing out modified file named in original :wq <Return> - quit vi, writing out modified file named in original :q <Return> - quit/ exit vi :q! <Return> - quit vi even though latest changes have not been saved
Window Motions
<ctrl>d Scroll down (half a screen) <ctrl>u Scroll up (half a screen) <ctrl>f Page forward <ctrl>b Page backward /string Search forward ?string Search backward <ctrl>l Redraw screen <ctrl>g Display current line number file information n Repeat search N Repeat search reverse G Go to last line nG Go to line n :n Go to line n z<CR> Reposition window: cursor at top z. Reposition window: cursor in middle z- Reposition window: cursor at bottom