Troubleshooting guide
Rev. 1.0
- 12 -
Not So Basic UNIX Commands (HP-UX & Solaris)
The vi command:
• You have to be in root to edit files
• To change information within text files type, “vi” and then the file name: #vi
netconf
• Once the file is shown you can use the arrow keys to move throughout the
file
• To insert text first hit the “esc” button, and then “i”. from then on if you type
anything it will insert where you left the cursor last
• To delete text first hi the “esc” button, and then “x”. now all text that the
cursor is on will be deleted when you push the “x” key
• When you go back and forth between inserting and deleting you must hit
the “esc” button before you switch
• To save hit “esc” and then “ :wq” . if you don’t want to save, “ :q”
• To delete entire rows hit “ddd”
• To make a new file type, “vi” and return at the prompt. type the new info
into the file. then type, “:w filename” this will save the file as whatever you
name it. (go back to netconf)(go back to hosts)
The tar command:
• This command lists/gets/compresses files from/to devices such as a DAT
drive
• tar –xvf gets the file from the tape and “expands” it and will put it into
whatever directory you are currently in. normally on our HP machines the
device alias for the DAT drive is 0mn. you must put the path of the device
after the tar command
• # tar –xvf /dev/rmt/0mn
• tar –cvf gets the file and “compresses” the file. you can use this
command to put a file onto a DAT tape.
• # tar –cvf /dev/rmt/0mn
• tar –t will show you what is on the tape
• # tar –t /dev/rmt/0mn