Page 153 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 153
Unit 8: Shell
TCSH is a programming language with conditional statements. The ‘t’ in tcsh comes from the T notes
in TENEX, an operating system which inspired Ken Greer, the author of tcsh, with its command-
completion feature. Ken Greer worked on tcsh in the late 1970s at Carnegie Mellon University.
Paul Placeway from The Ohio State University continued work on it in the 1980s, and since then
it has been maintained by numerous people. Wilfredo Sanchez, the former lead engineer of Mac
OS X, worked on tcsh in the early 1990s at MIT.
Early versions of Mac OS X shipped with tcsh as the default shell, but the default for new accounts
is bash as of 10.3. (tcsh is still provided, and upgrading the OS does not change the shell of any
existing accounts.) Iowa State’s implementation of MIT’s Project Athena (Project Vincent) by
default uses tcsh as the default shell, although users can change this.
Note The tcsh is the default shell of FreeBSD and its descendants like DragonFly
BSD, PC-BSD and DesktopBSD.
8.2 common shell commands
ls : list files/directories in a directory, comparable to dir in windows/dos.
ls -al : shows all files (including ones that start with a eriod), directories, and details attributes
for each file.
cd : change directory · · cd /usr/local/apache : go to /usr/local/apache/ directory
cd ~ : go to your home directory
cd - : go to the last directory you were in
cd .. : go up a directory cat : print file contents to the screen
cat filename.txt : cat the contents of filename.txt to your screen
chmod: changes file access permissions
The set of 3 go in this order from left to right:
USER - GROUP - EVERONE
0 = --- Â No permission
1 = --X Â Execute only
2 = -W- Â Write only
3 = -WX Â Write and execute
4 = R-- Â Read only
5 = R-X Â Read and execute
6 = RW- Â Read and write
7 = RWX Â Read, write and execute
Usage:
chmod numberpermissions filename
chmod 000 : No one can access
chmod 644:Â Usually for HTML pages
LoveLy professionaL university 147