Spacer
Spacer
BGSU
HomeAcademicsAdmissionsThe ArtsAthleticsLibrariesOffices
Spacer
Spacer Spacer
Top Nav   Technology Support Center
Cross Hatch
No Banner
Spacer Using the Korn Shell (ksh) on BGResearch Spacer
 
 

The following table describes some common Unix commands and features of the Korn (ksh) used on bgresearch.

Command or feature ksh (on bgresearch)
Commands executed when logging in

.profile

Commands executed with each process .kshrc
Display the contents of a file on the screen cat
Return to the login directory cd
Change default directory to directory-name cd directory-name
Clear the terminal screen clear
Copy file source to dest cp source dest
Interrupt the execution of the current program [Control]-c
Log off the system exit or [Control]-d
List files waiting to be printed lpq
Send a file to the printer cslpr filename
Lists the files in the current directory ls
Lists the files in the current directory, with more info. ls -l
Create a subdirectory called dir-name mkdir dir-name
Display information about a unix command man command
View a file one page at a time more filename
Rename a file mv old-name new-name
Change your password passwd
Save a session in a photo file photo log-file-name
Create or edit a file vi filename or
pico filename
Display the current default directory pwd
Delete (remove) a file rm filename
Delete (remove) an empty directory rmdir dirname
Redirect standard output to a file command > file
Redirect standard output and errors to a file command > file 2>&1
Create an alias alias m='more'
Remove an alias unalias m
List command history history
Reexecute the previous command r
Reexecute the previous command changing ab to xy r ab=xy
Reexecute the fifth command in the history list r 5
Reexecute the last command that started with vi r vi
Define a function

function fun {
   commands
}

Execute a function fun
Delete a function unset -f fun
Represents home directory of current user ~
Represents home directory of user jsmith ~jsmith
Represents current working directory . (period) or ~+
Represents previous working directory ~-
Compile a C++ program g++ prog.cpp
Compile a C++ program for use with debugger g++ -g prog.cpp
Complete a partial filename Press [Esc] then \

To set your bgunix prompt to be the current working directory, add the following line to $HOME/.profile : export PS1='$PWD>'

 
Spacer
Spacer Spacer
Spacer
Spacer
Spacer
Spacer
Spacer