COMP 151 - Lab 01




Lab Work

Command Description Usage
ls list contents of directory ls
ls -l
ls -F
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
cat filename | more
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 in the style of Pine Composer
- commands display in the bottom



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



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)