Mike's PBX Cookbook

CS1K Rel 7 - Linux Command Line Notes

Directories:

Home Directory

Locating Files

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:

CommandDescription
csloginSwitch form Linux to Call Server overlays using a PTY (~. to return)
csconsoleCoRes: Switch form Linux to Call Server console (Control AD to return)
cdpdtCoRes: Switch form Linux to Call Server PDT shell (exit to return)
appstart status/restartCheck status of/restart application processes eg pbxlink
ntpconfigSetup/Print Network Time Protocol Server details
swVersionShowDisplays linux base and application software version
baseparamsconfigReconfigure all settings (same as install script)
networkconfigReconfigure IP address information for Linux
datetimeconfigSets the Linux date and time

Linux Stuff:

CommandDescription
topShows the system processes using the most resources, good to gauge how busy a system is
logout / exit/ Ctrl-dTo exit the session
Ctrl-cTo break out if locked
Up arrowrecalls previous commands
pwdPrints working directory (the directory you're currently accessing)
cd /dir/dirChange directory to the fully qualified path
cd dir/dirChange directory to the path relative to the current working directory
cd ..Change directory to the parent directory
lsList the contents of the current working diretory in short format
llList 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
cpCopy 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 *.logPrint the pathname to any file ending in .log (works best when logged in as root and cd / before trying command)
sysbackup -bCreates a one time backup of the UC and application settings for recovering a system
mkdir <dirname>Create a directory
rmdir <dirname>Delete a directory
dfDisk space on devices
haltStops Linux in a controlled manor - better than just turning off power
ifconfigShows current Ethernet/IP configuration
CommandDescription
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
CommandDescription
mount /dev/sda1 /<temp dir name> -t vfatMounts a USB stick onto a temporary directory for general use
unmount /dev/sda1Unmount 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