Download Work with Files and Directories

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Windows Phone 8.1 wikipedia , lookup

MTS system architecture wikipedia , lookup

Mobile operating system wikipedia , lookup

RSTS/E wikipedia , lookup

Commodore DOS wikipedia , lookup

Library (computing) wikipedia , lookup

OS/2 wikipedia , lookup

Smallfoot wikipedia , lookup

OS-tan wikipedia , lookup

CP/M wikipedia , lookup

Windows NT startup process wikipedia , lookup

Security-focused operating system wikipedia , lookup

Burroughs MCP wikipedia , lookup

VS/9 wikipedia , lookup

Caldera OpenLinux wikipedia , lookup

IBM AIX wikipedia , lookup

Batch file wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

DNIX wikipedia , lookup

Spring (operating system) wikipedia , lookup

Unix time wikipedia , lookup

History of Unix wikipedia , lookup

Unix wikipedia , lookup

Unix security wikipedia , lookup

Berkeley Software Distribution wikipedia , lookup

Transcript
CS 497C – Introduction to UNIX
Lecture 2: Work with Files and
Directories
Chin-Chih Chang
[email protected]
Working with Files and
Directories
• Many commands refers to files and
directories.
• mkdir – creating a directory
$ mkdir docs
• ls – listing files and directories
$ ls
docs
• pwd – show your current directory
Working with Files and
Directories
$ pwd
/home/romeo
• cd – change directory
$ cd docs
$ pwd
/home/remeo/docs
• echo – write its arguments to standard
output
$ echo This is the first message > note1
$ echo This is the second message > note2
Working with Files and
Directories
$ ls
note1
note2
• cat – concatenate and display files
$ cat note1
This is the first message.
• wc: couting lines, words and characters
$ wc note1
1
5
26 notel
$ wc –l note1
1 note1
Working with Files and
Directories
• ls –l – checking the file attributes
$ ls –l
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
• man – find and display reference manual pages
$ man ls
How It All Clicked
• Till UNIX came on scene, operating
systems were designed with a particular
machine in mind. Programs designed for
one system simply wouldn’t run on another.
• Ken Thompson and Dennis Ritchie
designed and built a small system having an
elegant file system, a command interpreter
(the shell) and a set of utilities.
• In 1973, they rewrote the entire system in
C.
How It All Clicked
• UC Berkeley created BSD UNIX.
• The other brands of UNIX: Xenix, BSDi,
BSD/OS, FreeBSD, SunOS, Solaris, HPUX, AIX, Ultrix, Digital UNIX, IRIX, SCO
Open Server, SCO UnixWare.
• AT&T unify their own System V 3.2, BSD,
SunOS and XENIX into System V Release 4
(SVR4).
The Internet
• DARPA commissioned UCB to implement
TCP/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 the
Internet (and UNIX).
The Windows Threat
• Windows – a graphical user interface
(GUI) that uses 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 server
market (with Windows NT/2000).
• The MIT introduced X Window – the
first windowing system for UNIX.
Standards and POSIX
• In 1992, AT&T’s UNIX business was sold
to Novell. Novell then turned over the
UNIX to X/OPEN. The Open Group
published the single UNIX Specification.
• The Portable Operating System Interface
(POSIX) is a set of standard operating
interfaces based on UNIX.
• Most UNIX vendors cooperate with The
Open Group and also build products based
on the UNIX standard.