Lecture2_working With Files n Dires
-
Upload
shelly-jain -
Category
Documents
-
view
216 -
download
0
Transcript of Lecture2_working With Files n Dires
-
8/2/2019 Lecture2_working With Files n Dires
1/10
Lecture 2: Work with Files and
Directories
-
8/2/2019 Lecture2_working With Files n Dires
2/10
Working with Files and
Directories Many commands refers to files and
directories.
mkdircreating a directory$ mkdir docs
lslisting files and directories
$ lsdocs
pwdshow your current directory
-
8/2/2019 Lecture2_working With Files n Dires
3/10
Working with Files and
Directories$ pwd/home/romeo
cdchange directory
$ cd docs$ pwd
/home/remeo/docs
echowrite its arguments to standardoutput
$ echo This is the first message > note1
$ echo This is the second message > note2
-
8/2/2019 Lecture2_working With Files n Dires
4/10
Working with Files and
Directories$ lsnote1 note2
catconcatenate and display files
$ cat note1This is the first message.
wc: couting lines, words and characters
$ wc note11 5 26 notel
$ wcl note1
1 note1
-
8/2/2019 Lecture2_working With Files n Dires
5/10
Working with Files and
Directories lslchecking the file attributes
$ lsl
total 2-rw-r--r-- 1 romeo staff 26 Aug 22 02:05 note1
-rw-r--r-- 1 romeo staff 27 Aug 22 02:06 note2
manfind and display reference manual pages$ man ls
-
8/2/2019 Lecture2_working With Files n Dires
6/10
How It All Clicked
Till UNIX came on scene, operatingsystems were designed with a particularmachine in mind. Programs designed forone system simply wouldnt run on another.
Ken Thompson and Dennis Ritchiedesigned and built a small system having anelegant file system, a command interpreter
(the shell) and a set of utilities. In 1973, they rewrote the entire system in
C.
-
8/2/2019 Lecture2_working With Files n Dires
7/10
How It All Clicked
UC Berkeley createdBSD UNIX.
The other brands of UNIX: Xenix, BSDi,
BSD/OS, FreeBSD, SunOS, Solaris, HP-UX, AIX, Ultrix, Digital UNIX, IRIX, SCOOpen Server, SCO UnixWare.
AT&T unify their own System V 3.2, BSD,
SunOS and XENIX into System V Release 4(SVR4).
-
8/2/2019 Lecture2_working With Files n Dires
8/10
The Internet
DARPA commissioned UCB to implementTCP/IP on BSD UNIX.
TCP/IP is a set of protocols used by the
Internet for communication. The incorporation of TCP/IP into UNIX and
its use as the basis of development were two
key factors in the rapid growth of theInternet (and UNIX).
-
8/2/2019 Lecture2_working With Files n Dires
9/10
The Windows Threat
Windowsa graphical user interface(GUI) thatuses the mouse rather than
arcane and complex command options
to execute a job. Windows first swept the desktop market
(with Windows 3.1/95/98/Me) and then
made significant inroads into the servermarket (with Windows NT/2000).
The MIT introduced X Windowthe
first windowing system for UNIX.
-
8/2/2019 Lecture2_working With Files n Dires
10/10
Standards and POSIX
In 1992, AT&Ts UNIX business was soldto Novell. Novell then turned over theUNIX to X/OPEN. The Open Group
published the single UNIX Specification. The Portable Operating System Interface
(POSIX)is a set of standard operatinginterfaces based on UNIX.
Most UNIX vendors cooperate with TheOpen Group and also build products basedon the UNIX standard.