CS1K Rel 6 - Linux Command Line Notes
Directories:
Home Directory
- When you login as nortel your home directory is /home/nortel
- When you login as root your home directory is /root: this is different to /
- You can use the $HOME variable to refernce your home directory: cd $HOME
Locating Files
- Patch files need to be located in /var/opt/nortel/patch
- Application Log files are located in /var/log/nortel
- CPPM-Cores files system (/p /u /e) is located at /var/opt/nortel/cs/fs
- CD RPT log files are located in /var/opt/nortel/cs/fs/e/rpt/ (use rdopen/rdtail in PDT to view)
- DCH trace logs are located in /var/opt/nortel/cs/fs/u/trace/dch.log
- Deployment backup files /var/opt/nortel/deployment/deployed/"sys name"/backup
To change directories you use the cd command, but to make life easier and save typing, you can use the <TAB> key to automatically add the directory. Try this:- Type "cd /v" then hit the <TAB> key. Because there is only one directory begining with "v" the system will automatically change the line to "cd/var/" if you want to go further you can add the first letter of the next directory e.g. "cd /var/o" and again hit the <TAB> key. The line will not be updated to "cd/var/opt/" you can keep going till you have the full directory path. If there are two options, the system will BEEP and you will need to add another character and <TAB> again. This technique can also be used with commands such as copy (cp).
Call Server:
Command | Description |
clihelp | Uses more to list all cli commands for Nortel Applications |
cslogin | Switch form Linux to Call Server overlays using a PTY (~. to return) |
csconsole | CoRes: Switch form Linux to Call Server console (Control AD to return) |
cdpdt | CoRes: Switch form Linux to Call Server PDT shell (exit to return) |
appstart status/restart | Check status of/restart application processes eg pbxlink |
ntpconfig | Setup/Print Network Time Protocol Server details |
swVersionShow | Displays linux base and application software version |
Sig Server:
Command | Description |
SIPOutput | Sets output for SIP call Trace 1=TTY |
SIPCallTrace tSSG on | Turns on SIP call tracing (tSSG refers to VTRK rather than SIPL) |
Linux Stuff:
Command | Description |
sysbackup -b | Creates a one time backup of the UC and application settings for recovering a system |
logout/exit/<ctrl>d | To exit the session |
<ctrl>c | To break out if locked |
su "uname" | Switch User, if no name is specified logs in to root. Add -l to use login dir |
pwd | Prints working directory (the directory you're currently accessing) |
cd /dir/dir | Change directory to the fully qualified path |
cd dir/dir | Change directory to the path relative to the current working directory |
cd .. | Change directory to the parent directory |
ls | List the contents of the current working diretory in short format |
ll | List the contents of the current working diretory in long format |
man <cmd> | Obtain help on the specified command from the online manual |
cat <filename> | Print entire contents of a file from start to finish |
find / -name *.log | Print the pathname to any file ending in .log (works best when logged in as root and cd / before trying command) |
Up arrow | recalls previous commands |
Tab key | will auto complete filenames eg cd /tm <tabkey> will change directory to /tmp as there is no other directories or files under root beginning with tm. |
mkdir <dirname> | Create a directory |
rmdir <dirname> | Delete a directory |
more <filename> | Print the contents of a file (advance a line at a time with CR, or page at a time with SPACE) |
df | Disk space on devices |
cp | Copy a file or files |
halt | Stops Linux in a controlled manor - better than just turning off power |
Command | Description |
tail <logfile> | Display 10 (default) most recent entries in a log file |
tail -100 <logfile> | Display 100 most recent entries in a log file |
tail -f <logfile> | Live monitor events as they are written to the log file |
tail -f <logfile> | grep <string> | Live monitor events as they are written to the log file and only display lines that contain <string> |
tail -f <logfile> | grep -v <string> | Live monitor events as they are written to the log file and do not display lines that contain <string>, ie, filter out lines that you do not want to see |
Command | Description |
mount /dev/sda1 /<temp dir name> -t vfat | Mounts a USB stick onto a temporary directory for general use |
unmount /dev/sda1 | Unmount the USB stich before removing |
Stop LINUX passwords ageing after 90 days. For UCM passwords use Policies in UCM
Login as root:
>passwd <username> -x -1
eg:
>passwd root -x -1
>passwd nortel -x -1