CS1K Rel 7 - Linux Command Line Notes
Directories:
Home Directory
- When you login as nortel your home directory is /home/admin2
- 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).
CS1K Related:
Command | Description |
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 |
baseparamsconfig | Reconfigure all settings (same as install script) |
networkconfig | Reconfigure IP address information for Linux |
datetimeconfig | Sets the Linux date and time |
Linux Stuff:
Command | Description |
top | Shows the system processes using the most resources, good to gauge how busy a system is |
logout / exit/ Ctrl-d | To exit the session |
Ctrl-c | To break out if locked |
Up arrow | recalls previous commands |
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 |
su "uname" | Switch User, if no name is specified logs in to root. Add -l to use login dir |
cp | Copy a file or files |
cat <filename> | Print entire contents of a file from start to finish |
more <filename> | Print the contents of a file (advance a line at a time with CR, or page at a time with SPACE) |
find / -name *.log | Print the pathname to any file ending in .log (works best when logged in as root and cd / before trying command) |
sysbackup -b | Creates a one time backup of the UC and application settings for recovering a system |
mkdir <dirname> | Create a directory |
rmdir <dirname> | Delete a directory |
df | Disk space on devices |
halt | Stops Linux in a controlled manor - better than just turning off power |
ifconfig | Shows current Ethernet/IP configuration |
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