Lecture 1: Introduction, Basic UNIX
description
Transcript of Lecture 1: Introduction, Basic UNIX
Structure of a typical OS
Applications
Shell
\Kernel (OS)
Hardware
There are many standard applications:
• file system commands
• text editors
• compilers
• text processing
Looking Around
Home directoryStartup and customization filespublic_htmlFiles/dirscd, pwd, lsFilesystem Absolutle Relative
Commands for FilesLooking around
ls, pwd, cd, pushd, popdFiles/dirs
rm, cp, mv, mkdir, rmdir, lnViewing
cat, less (more), od, w3m, pdftotext, antiwordComparing
diff, cmp
Commands for Archiving
tar – Tape Archive makes a large file from many files
Compressiongzip, gunzip, bzip, compress
File Permissions
Three types: read abbreviated r write abbreviated w execute abbreviated x
There are 3 sets of permission:1. user2. group3. other (the world, everybody else)
ls -l and permissions
-rwxrwxrwx User Group Others
Type of file:- – plain filed – directorys – symbolic link
Bourne-again Shell (bash)
ShellsStartupTypes Alias, shell builtin, disk utility
(program)
Syntax Options, args
Shell metacharactersSome characters have special meaning to the shell: I/O redirection< > |
wildcards* ? [ ]
others& ; $ ! \ ( ) space tab newline
These must be escaped or quoted to inhibit special behavior
filtersUnix philosophy Everything's a file Text processing
Some common filters… wc, tr, grep, sort, cut, awk, uniq, head, tail, wc