Simple Unix commands
Command |
Description |
Usage |
ls |
list contents of
directory |
ls |
pwd |
return working
directory |
pwd |
mkdir |
create a new
directory |
mkdir newfolder |
cd |
change working
directory |
cd directory |
man |
display the
system manual |
man ls |
grep |
search pattern in
a file |
grep pattern
filename |
cp |
copy a file |
cp source dest |
mv |
move file |
mv old_name
new_name |
cat |
display content
of a file |
cat filename |
head |
look at the top
of a file |
head filename |
tail |
look at the end
of a file |
tail filename |
more |
display text file
one screen by one |
more filename |
less |
opposite of more |
less filename |
chmod |
change the permissions mode |
chmod 744
filename |
alias |
create shortcut
for command |
alias ls
'ls -F' |
Text editor Pico
- text editor in the style of Pine Composer
- commands display in the bottom
Short-Cut |
Function |
Ctrl-A | go to the beginning character |
Ctrl-E | go to the end character |
Ctrl-K | cut a line |
Ctrl-U | paste line(s) you have cut |
Ctrl-W | search |
complier g++
- a C++ complier in UNIX
> g++ hangman.cpp
> g++ -o hangman hangman.cpp
learn how to logon and use your unix account
All problems with logging-on should be reported immediately to the TA
running the tutorial.
Note: This is your only chance to inform us of problems accessing
your account; If you do not inform us of such problems now, we will not
accept "problem in accessing my account" as an excuse for not
doing later labs or the assignments.
change the secret string of hangman.cpp to "evaluate"
compile and run the program
implement a Sum function using stack.cpp, that prints the summation of
the numbers in the stack.
compile and run the program
This lab does not have to be submitted. You will only
be marked on attendance.
(Starting next week, all labs will have to be submitted)