Вы находитесь на странице: 1из 65

CSE 101- Principles of Computing

Mekelle Institute of Technology 2013/2014

11/10/2013

Mekelle Institue of Technology Kifle B.N

Chapter one
Contents
Computers, parts of computers and their roles Data and Networking Operating systems Accounts Command prompt Command options and arguments DOS and Unix common commands The Job of the Shell
Mekelle Institue of Technology Kifle B.N 2

11/10/2013

Goals of the chapter


After completing lesson, you will be able to:

Describe the importance of computers in todays world.


Identify the main parts of a computer. Identify the steps for starting a computer. Identify the primary hardware components of a computer.

Define an operating system and its role.


Define the term program. Explain what is meant by data. Define the term network, and identify the benefits of networking.

Define the term Internet. Exercise common Unix commands

11/10/2013

Mekelle Institue of Technology Kifle B.N

The Role of Computers


In Business and Industry In Publication Field In Education Field

In Government Organizations
In Medical Field In Science Field In Entertainment Field
11/10/2013 Mekelle Institue of Technology Kifle B.N 4

Parts of a Computer

1. Input Devices (Keyboard, Mouse, etc.) 2. Output Devices (Monitor, Speakers, etc.) 3. Central Processing Unit (CPU) and memory 4. Motherboard (Circuit Board) 5. Expansion Cards (Video Card, Sound Card, or NIC)

6. Hard Drive Ports and Connections (USB, Firewire, etc.)

11/10/2013

Mekelle Institue of Technology Kifle B.N

Basic Personal Computer System

A computer system consists of hardware and software components.


Hardware is the physical equipment such as the case, storage drives, keyboards, monitors, cables, speakers, and printers. Software is the operating system and programs.

The operating system instructs the computer how to operate.


Programs or applications perform different functions.

Computer Cases and Power Supplies


Computer case Provides protection and support for internal components Should be durable, easy to service, and have enough room for expansion Power supply Converts AC power from the wall socket into DC Must provide enough power for the installed components and future additions

Power Supplies
The power supply converts alternatingcurrent (AC) power coming from a wall outlet into direct-current (DC) power, which is a lower voltage. DC power is required for all of the components inside the computer. Cables, connectors, and components are designed to fit together comfortably. Never force any connector

Power Connectors
Most connectors today are keyed connectors.
Keyed connectors are designed to be inserted in only one direction.

Each part of the connector has a colored wire with a different voltage running through it Different connectors are used to connect specific components and various locations on the motherboard: A Molex connector is a keyed connector used to connect to an optical drive or a hard drive. A Berg connector is a keyed connector used to connect to a floppy drive. A Berg connector is smaller than a Molex connector. A 20-pin or 24-pin slotted connector is used to connect to the motherboard. The 24-pin slotted connector has two rows of 12-pins each, and the 20-pin slotted connector has two rows of 10-pins each. A 4-pin to 8-pin auxiliary power connector has two rows of two to four pins and supplies power to all areas of the motherboard. The 4-pin to 8-pin auxiliary power connector is the same shape as the main power connector, but smaller. Older standard power supplies used two connectors called P8 and P9 to connect to the motherboard. P8 and P9 were unkeyed connectors. They could be installed backwards, potentially damaging the motherboard or power supply. The installation required that the connectors were lined up with the black wires together in the middle.

Four Basic Units of Electricity


Voltage (V) is a measure of the force required to push electrons through a circuit. Voltage is measured in volts. A computer power supply usually produces several different voltages. Current (I) is a measure of the amount of electrons going through a circuit. Current is measured in amperes, or amps (A). Computer power supplies deliver different amperages for each output voltage. Power (P) is voltage multiplied by current. The measurement is called watts (W). Computer power supplies are rated in watts. Resistance (R) is the opposition to the flow of current in a circuit. Resistance is measured in ohms. Lower resistance allows more current to flow through a circuit. Formulas
V = IR P = VI

Power Supplies
CAUTION: Do not open a power supply. Electronic capacitors located inside of a power supply can hold a charge for extended periods of time.

Internal Components

Motherboards
The main printed circuit board. Contains the buses, or electrical pathways found in a computer. Buses allow data to travel among the various components. Also known as the system board, the backplane, or the main board. Accommodates CPU, RAM, expansion slots, heat sink/fan assembly, BIOS chip, chip set, sockets, internal and external connectors,

Central Processing Unit (CPU)


Known as the brain of the computer. Also referred to as the processor. Most important element of a computer system. Executes a program, which is a sequence of stored instructions. Two major CPU architectures related to instruction sets:
Reduced Instruction Set Computer (RISC) Complex Instruction Set Computer (CISC)

Central Processing Unit (CPU)


To an operating system, a single CPU with hyperthreading appears to be two CPUs. The wider the processor data bus width, the more powerful the processor. Current processors have a 32-bit or a 64-bit processor data bus. Overclocking is a technique used to make a processor work at a faster speed than its original specification. MMX enabled microprocessors can handle many common multimedia operations that

Parts of a Computer Central Processing Unit (CPU)


A device that interprets and runs the commands that you give to the computer.
Also referred to as the processor. Two major brands are Intel and AMD. Examples: Intel Core 2 Duo, AMD Turion X2

11/10/2013

Mekelle Institue of Technology Kifle B.N

16

Cooling Systems
Electronic components generate heat. Too much heat can damage components. A case fan makes the cooling process more efficient. A heat sink draws heat away from the core of the CPU. A fan on top of the

Case Fan CPU Fan

Parts of a Computer Memory


Memory is where information is stored and retrieved by the CPU. There are two main types of memory: Random Access Memory (RAM): It is the main memory and allows you to temporarily store commands and data. Read Only Memory (ROM): It is the memory that retains its contents even after the computer is turned off.
11/10/2013 Mekelle Institue of Technology Kifle B.N 18

Read-only Memory (ROM)


Basic instructions for booting the computer and loading the operating system are stored in ROM.
ROM Types ROM PROM

ROM Types
Read-only memory chips Programmable read-only memory Erasable programmable read-only memory

Description
Information is written to a ROM chip when it is manufactured. A ROM chip cannot be erased or re-written and can become obsolete. Information is written to a PROM chip after it is manufactured. A PROM chip cannot be erased or re-written.
Information is written to an EPROM chip after it is manufactured. An EPROM chip can be erased with exposure to UV light. Special equipment is required. Information is written to an EEPROM chip after it is manufactured. EEPROM chips are also called Flash ROMs. An EEPROM chip can be erased and re-written without having to remove the chip from the computer.

EPROM

Electrically erasable EEPROM programmable read-only memory

Serial Ports and Cables


A serial port can be either a DB-9, as shown, or a DB-25 male connector. Serial ports transmit one bit of data at a time. To connect a serial device, such as a modem or printer, a serial cable must be used.

USB Ports and Cables


USB is a standard interface for connecting peripheral devices to a computer. USB devices are hot-swappable. USB ports are found on computers, cameras, printers, scanners, storage devices, and many other electronic devices. Some devices can also be powered through the USB port, eliminating the need for an

FireWire Ports and Cables


FireWire is a high-speed, hot-swappable interface. Some devices can also be powered through the FireWire port, eliminating the need for an external power source. The IEEE 1394a standard supports data rates up to 400 Mbps and cable lengths up to 15 feet (4.5 m). This standard uses a 6-pin connector or a 4-pin connector.

Parallel Ports and Cables


Parallel ports can transmit 8 bits of data at one time and use the IEEE 1284 standard. To connect a parallel device, such as a printer, a parallel cable must be used. A parallel cable has a maximum length of 15 feet (4.5 m).

Network Ports and Cables


A network port, also known as an RJ-45 port, connects a computer to a network. Standard Ethernet can transmit up to 10 Mbps. Fast Ethernet can transmit up to 100 Mbps. Gigabit Ethernet can transmit up to 1000 Mbps. The maximum length of network cable is 328 feet (100 m).

Input Devices

Fingerprint scanner

Input devices used to enter data or instructions into a computer: Mouse and Keyboard Digital camera and digital video camera Biometric authentication device Digital camera Touch screen Scanner

Other Output Devices


Printers, Scanners, and Fax Machines - Printers are output devices that create hard copies of computer files. Other all-in-one type printers are designed to provide multiple services such as printing, fax, and copier functions. Speakers and headphones are output devices for audio signals. Most computers have audio support either integrated into the motherboard or on an adapter card. Audio support includes ports that allow input and output of audio signals.

Headphones

Parts of a Computer Motherboard


o Is the main circuit board inside the computer.
o Has tiny electronic circuits and other components on it. o Connects input, output, and processing devices together (CPU, Memory, Hard Drive, DVD Drive)

o Tells the CPU how to run.

11/10/2013

Mekelle Institue of Technology Kifle B.N

27

Parts of a Computer Expansion Cards


Video Card is connected to the computer monitor and is used to display information on the monitor.

Network Interface Card (NIC) is connected to other computers so that information can be exchanged between them. Sound Card converts audio signals (microphone or audio tape) which can be stored as a computer audio file.
11/10/2013 Mekelle Institue of Technology Kifle B.N 28

Hardware
Refers to all the physical components of a computer. Includes all input devices, processing devices, storage devices, and output devices. Examples of hardware are: o keyboard o mouse o motherboard o monitor o hard disk o cables o printer
11/10/2013 Mekelle Institue of Technology Kifle B.N 29

What is OS?

Operating System is a software, which makes a computer to actually work. It is the software the enables all the programs we use. The OS organizes and controls the hardware. OS acts as an interface between the application programs and the machine hardware.

Examples: Windows, Linux, Unix and Mac OS, etc.,

11/10/2013

Mekelle Institue of Technology Kifle B.N

30

What OS does?
An operating system performs basic tasks such as,

controlling and allocating memory, prioritizing system requests, controlling input and output devices, facilitating networking and managing file systems.

11/10/2013

Mekelle Institue of Technology Kifle B.N

31

Structure of Operating System:


Application Programs
System Programs Software (Operating System) HARDWARE

(Contd)
11/10/2013 Mekelle Institue of Technology Kifle B.N 32

Structure of Operating System (Contd):

The structure of OS consists of 4 layers: 1. Hardware Hardware consists of CPU, Main memory, I/O Devices, etc,
1.

Software (Operating System) Software includes process management routines, memory management routines, I/O control routines, file management routines.
(Contd)

11/10/2013

Mekelle Institue of Technology Kifle B.N

33

Structure of Operating System (Contd):

1.

System programs This layer consists of compilers, Assemblers, linker etc. Application programs This is dependent on users need. Ex. Railway reservation system, Bank database management etc.,

1.

11/10/2013

Mekelle Institue of Technology Kifle B.N

34

Multiprogramming:

Multiprogramming is a technique to execute number of programs simultaneously by a single processor. In Multiprogramming, number of processes reside in main memory at a time. The OS picks and begins to executes one of the jobs in the main memory. If any I/O wait happened in a process, then CPU switches from that job to another job. Hence CPU in not idle at any time.

11/10/2013

Mekelle Institue of Technology Kifle B.N

35

Multiprogramming (Contd):
OS
Figure

Job 1
Job 2 Job 3 Job 4 Job 5

dipicts the layout of multiprogramming system. The main memory consists of 5 jobs at a time, the CPU executes one by one. Advantages:

Efficient memory utilization


Throughput increases CPU is never idle, so performance increases.

11/10/2013

Mekelle Institue of Technology Kifle B.N

36

Time Sharing Systems:

Time sharing, or multitasking, is a logical extension of multiprogramming. Multiple jobs are executed by switching the CPU between them. In this, the CPU time is shared by different processes, so it is called as Time sharing Systems. Time slice is defined by the OS, for sharing CPU time between processes. Examples: Multics, Unix, etc.,

11/10/2013

Mekelle Institue of Technology Kifle B.N

37

Operating Systems functions:

The main functions of operating systems are:


1. Program creation 2. Program execution

3. Input/Output operations
4. Error detection 5. Resource allocation 6. Accounting 7. protection

11/10/2013

Mekelle Institue of Technology Kifle B.N

38

The Types of Operating Systems


Command Line Interface (CLI): The user types commands at a prompt.

Graphical User Interface (GUI):


The user interacts with menus and icons.

Most operating systems include both a GUI and a CLI.

Compare Operating Systems


Terms often used when comparing operating systems: Multi-user Two or more users can work with programs and share peripheral devices, such as printers, at the same time. Multi-tasking The computer is capable of operating multiple applications at the same time. Multi-processing The computer can have two or more central processing units (CPUs) that programs share. Multi-threading A program can be broken into smaller parts that can be loaded as needed by the operating system. Multithreading allows individual programs to be multi-tasked.

Programs
o The hardware and the operating system together are referred to as a platform. o Programs, also called applications, use this platform to perform tasks.

o There are many types of programs:


o Some programs allow you to perform tasks such as writing letters, doing calculations, or sending e-mail messages. o Other programs allow you to create illustrations, play games, watch movies, or communicate with other computer users.
11/10/2013 Mekelle Institue of Technology Kifle B.N 41

Data
o Programs process data that you provide as input to your computer. o Data can be in the form of text, graphics, audio, or video depending on the type of program. o Program processes the data and displays the output on the screen. o You can save this output in a file. o The file can be an audio file, a text file, a graphics file, or a video file.
11/10/2013 Mekelle Institue of Technology Kifle B.N 42

Networks
Is a group of computers and associated devices that are linked together to facilitate sharing information. Can also be used to share data and devices such as printers.

A typical network has the following three components:


o Server o Workstation o Communication channel

11/10/2013

Mekelle Institue of Technology Kifle B.N

43

Networks LAN
Connects devices within a limited area (home or a small group of offices)
Commonly includes computers and shared resources (printers and scanners)

11/10/2013

Mekelle Institue of Technology Kifle B.N

44

Networks WAN
Is a network that connects devices in geographically separated areas.
Is used to connect networks across different countries. The Internet is an example of a WAN.

11/10/2013

Mekelle Institue of Technology Kifle B.N

45

Internet
Internet is a worldwide collection of public networks that are linked to each other for information exchange. Internet offers a range of services to its users (file transfers between Internet users and electronic mail)

The World Wide Web (WWW), or the Web, is another service that the Internet provides.
An intranet is similar to the Web but is accessible only to authorized users of the organization.

11/10/2013

Mekelle Institue of Technology Kifle B.N

46

What is a command prompt?


A command prompt is a non-graphical interface that allows you to interact with your operating system. At the command prompt, you enter commands by typing their names followed by options and arguments. Most modern computers use a graphical user interface (GUI), which allows users to more intuitively access programs and documents. However, some programs and commands are still only available only through a command prompt. To access the command prompt, follow the instructions appropriate to your operating system.
11/10/2013 Mekelle Institue of Technology Kifle B.N 47

Accessing command prompt


To access the command prompt in Windows, in Windows 7, click the Start button and enter cmd. In other versions, from the Start menu, select Run... and then enter cmd. When you log into a Unix computer, your shell begins to run and provides you with a command prompt. The command prompt's appearance varies depending on the shell you're using.
11/10/2013 Mekelle Institue of Technology Kifle B.N 48

What are some examples of common DOS commands?


The following is a list of useful DOS commands, with explanations. They are useful on older DOS systems and in the commandline interface on modern Windows systems. To access the command-line interface: Windows 7 or Vista: Click Start, type cmd , and then press Enter. Certain commands may require administrative access on Windows 7 or Vista. To launch the command line interface in administrative mode, click Start, type cmd , and then right-click the cmd or cmd.exe search result and choose Run as Administrator. Windows XP: Click Start, then Run. Type cmd , and then press Enter.
11/10/2013 Mekelle Institue of Technology Kifle B.N 49

What are some examples of common DOS commands?


Ver
Check the version of DOS.

time
Check or correct the system time.

date
Check or correct the system date.

cls
Clear the screen.

scandisk
Scan and check drive c: for errors. ScanDisk replaces chkdsk (see below) on DOS version 6.0 and above (including Windows 95).

chkdsk
Check disk and memory usage of the current disk.

help
List commands (only in DOS versions 5 or later).

11/10/2013

Mekelle Institue of Technology Kifle B.N

50

What are some examples of common DOS commands?


dir
List files in the current directory in one column. List files in five columns. List files one page at a time. List all files with an .ext extension. List files with .ext extensions that have four letters and start with z (where z is a character of your choice). Change to the a: drive. Make a new subdirectory named diry in the c:\ directory. Change to subdirectory diry. Remove the existing subdirectory named diry. Delete a file named file.ext. Rename file file1 to file2. Copy file file1 to file2.

dir /w dir /p

dir *.ext dir z???.ext a:


md c:\diry cd c:\diry rd c:\diry del file.ext ren file1 file2 copy file1 file2

11/10/2013

Mekelle Institue of Technology Kifle B.N

51

Introduction to common Unix commands?


For more extensive information about any of these commands, use the man command as described below.

11/10/2013

cal cd cp find kill man mv Rm w and who

cat chmod date jobs ls mkdir pwd rmdir

Mekelle Institue of Technology Kifle B.N

52

Unix Commands
cal
This command will print a calendar for a specified month and/or year. To show this month's calendar, enter: cal To show a twelve-month calendar for 2008, enter: cal 2008 To show a calendar for just the month of June 1970, enter: cal 6 1970

cat
This command outputs the contents of a text file. You can use it to read brief files or to concatenate files together. To append file1 onto the end of file2, enter: cat file1 >> file2 To view the contents of a file named myfile, enter: cat myfile

11/10/2013

Mekelle Institue of Technology Kifle B.N

53

Unix Commands
cd
This command changes your current directory location. To switch to a subdirectory (of the current directory) named myfiles, enter: cd myfiles To switch to a directory named /home/dvader/empire_docs, enter: cd /home/dvader/empire_docs To move to the parent directory of the current directory, enter: cd .. To move to the root directory, enter: cd / To return to your home directory, enter: cd

chmod
This command changes the permission information associated with a file. permission to read, write, or execute the file, abbreviated as r, w, and x. These permissions are broken down for three categories of user: first, the owner of the file; second, a group with which both the user and the file may be associated; and third, all other users. These categories are abbreviated as u for owner (or user), g for group, and o for other. To allow yourself to execute a file that you own named myfile, enter: chmod u+x myfile To allow anyone who has access to the directory in which myfile is stored to read or execute myfile, enter: chmod o+rx myfile

11/10/2013

Mekelle Institue of Technology Kifle B.N

54

Unix Commands
In Unix, how do I change the permissions for a file? You can change file permissions with the chmod command. In Unix, file permissions, which establish who may have different types of access to a file, are specified by both access classes and access types. Access classes are groups of users, and each may be assigned specific access types. The access classes are "user", "group", "other", and "all.
These refer, respectively, to the user who owns the file, a specific group of users, the other remaining users who are not in the group, and all three sets of users.

Access types (read, write, and execute) determine what may be done with the file by each access class.
11/10/2013 Mekelle Institue of Technology Kifle B.N 55

Unix Commands
Access Class u (user) g (group) o (other) a (all: u, g, and o) Operator Access + (add access) - (remove access) = (set exact access) Type r (read) w (write) x(execute)

For example, to add permission for everyone to read a file in the current directory named myfile, at the Unix prompt, you would enter:
chmod a+r myfile

The a stands for "all", the + for "add", and the r for "read".

Note: This assumes that everyone already has access to the directory where myfile is located and its parent directories; that is, you must set the directory permissions separately
11/10/2013 Mekelle Institue of Technology Kifle B.N 56

Unix Commands
You can also specify multiple classes and types with a single command. For example, to remove read and write permission for group and other users (leaving only yourself with read and write permission) on a file named myfile, you would enter: chmod go-rw myfile You can also specify that different permissions be added and removed in the same command. For example, to remove write permission and add execute for all users on myfile, you would enter:
chmod a-w+x myfile

In each of these examples, the access types that aren't specified are unchanged. The previous command, for example, doesn't change any existing settings specifying whether users besides yourself may have read ( r ) access to myfile. You could also use the exact form to explicitly state that group and other users' access is set only to read with the = operator:
chmod go=r myfile
11/10/2013 Mekelle Institue of Technology Kifle B.N 57

Unix Commands
cp
This command copies a file, preserving the original and creating an identical copy. The general syntax for cp is: cp oldfile newfile To copy a file named meeting1 in the directory /home/dvader/notes to your current directory, enter: cp /home/dvader/notes/meeting1 . The . (period) indicates the current directory as destination, and the i ensures that if there is another file named meeting1 in the current directory, you will not overwrite it by accident. To copy a file named oldfile in the current directory to the new name newfile in the mystuff subdirectory of your home directory, enter: cp -i oldfile ~/mystuff/newfile The ~ character (tilde) is interpreted as the path of your home directory. Note: You must have permission to read a file in order to copy it.

date
The date command displays the current day, date, time, and year. To see this information, enter: date
11/10/2013 Mekelle Institue of Technology Kifle B.N 58

Unix Commands
find
The find command lists all of the files within a directory and its subdirectories that match a set of conditions. This command is most commonly used to find all of the files that have a certain name. To find all of the files named myfile.txt in your current directory and all of its subdirectories, enter: find . -name myfile.txt -print To look in your current directory and its subdirectories for all of the files that end in the extension .txt , enter: find . -name "*.txt" -print In these examples, the . (period) represents your current directory. It can be replaced by the full pathname of another directory to search. For instance, to search for files named myfile.txt in the directory /home/user/myusername and its subdirectories, enter: find /home/user/myusername/ -name myfile.txt -print

11/10/2013

Mekelle Institue of Technology Kifle B.N

59

Unix Commands
jobs
This command reports any programs that you suspended and still have running or waiting in the background (if you had pressed Ctrl-z to suspend an editing session, for example). For a list of suspended jobs, enter: jobs Each job will be listed with a number; to resume a job, enter % (percent sign) followed by the number of the job. To restart job number two, for example, enter: %2 This command is only available in the csh, bash, tcsh, and ksh shells.

kill
Use this command as a last resort to destroy any jobs or programs that you suspended and are unable to restart. Use the jobs command to see a list of suspended jobs. To kill suspended job number three, for example, enter: kill %3 Now check the jobs command again. If the job has not been cancelled, harsher measures may be necessary. Enter: kill -9 %3

11/10/2013

Mekelle Institue of Technology Kifle B.N

60

Unix Commands
ls
This command will list the files stored in a directory. To see a brief, multi-column list of the files in the current directory, enter: ls

man
This command displays the manual page for a particular command. If you are unsure how to use a command or want to find out all its options, you might want to try using man to view the manual page. For example, to learn more about the ls command, enter: man ls To learn more about man, enter: man man If you are not sure of the exact command name, you can use man with the -k option to help you find the command you need. To see one line summaries of each reference page that contains the keyword you specify, enter: man k keyword
Replace keyword in the above example with the keyword which you want to reference.
11/10/2013 Mekelle Institue of Technology Kifle B.N 61

Unix Commands
mv
This command will move a file. You can use mv not only to change the directory location of a file, but also to rename files. Unlike the cp command, mv will not preserve the original file.

Note: As with the cp command, you should always use i to make sure you do not overwrite an existing file.
To rename a file named oldname in the current directory to the new name newname, enter: mv -i oldname newname To move a file named hw1 from a subdirectory named newhw to another subdirectory named oldhw (both subdirectories of the current directory), enter: mv -i newhw/hw1 oldhw If, in this last operation, you also wanted to give the file a new name, such as firsthw, you would enter:
mv -i newhw/hw1 oldhw/firsthw
11/10/2013 Mekelle Institue of Technology Kifle B.N 62

Unix Commands
mkdir
This command will make a new subdirectory. To create a subdirectory named mystuff in the current directory, enter: mkdir mystuff To create a subdirectory named morestuff in the existing directory named /tmp, enter:
mkdir /tmp/morestuff

pwd
This command reports the current directory path. Enter the command by itself: pwd

rm
This command will remove (destroy) a file. You should enter this command with the -i option, so that you'll be asked to confirm each file deletion. To remove a file named junk, enter: rm -i junk

rmdir
This command will remove a subdirectory. To remove a subdirectory named oldstuff, enter: rmdir oldstuff Note: The directory you specify for removal must be empty. To clean it out, switch to the directory and use the ls and rm commands to inspect and delete files.

11/10/2013

Mekelle Institue of Technology Kifle B.N

63

Unix Commands
w and who
The w and who commands are similar programs that list all users logged into the computer. If you use w, you also get a list of what they are doing. If you use who, you also get the IP numbers or computer names of the terminals they are using. Ping

The ping command sends an Internet Control Message Protocol (ICMP) ECHO_REQUEST to obtain an ICMP ECHO_RESPONSE from a host or gateway. The ping command is useful for:
Determining the status of the network and various foreign hosts. Tracking and isolating hardware and software problems. Testing, measuring, and managing networks.

If the host is operational and on the network, it responds to the echo. Each echo request contains an Internet Protocol (IP) and ICMP header, followed by a timeval structure, and enough bytes to fill out the packet. The default is to continuously send echo requests until an Interrupt is received (Ctrl-C).
11/10/2013 Mekelle Institue of Technology Kifle B.N 64

The echo Command


echo is a built-in command in the bash and C shells that writes its arguments to standard output. A shell is a program that provides the command line (i.e., the alltext display user interface) on Linux and other Unix-like operating systems. It also executes (i.e., runs) commands that are typed into it and displays the results. bash is the default shell on Linux. A command is an instruction telling a computer to do something. An argument is input data for a command. Standard output is the display screen by default, but it can be redirected to a file, printer, etc. The syntax for echo is:
echo [option(s)] [ string(s)]

The items in square brackets are optional. A string is any finite sequence of characters (i.e., letters, numerals, symbols and punctuation marks).
11/10/2013 Mekelle Institue of Technology Kifle B.N 65

Вам также может понравиться