SlideShare a Scribd company logo
UNIX COMMANDS



is -l : lists your files in 'long format', which contains lots of useful information, e.g. the exact size of
the file, who owns the file and who has the right to look at it, and when it was last modified.

cp filename1 filename2 :             copies a file

rm filename : removes a file. It is wise to use the option rm -i, which will ask you for confirmation
before actually deleting anything.

chmod options filename : lets you change the read, write, and execute permissions on your files.
The default is that only you can look at them and change them.

                          u - User who owns the file.

                          g - Group that owns the file.

                          o - Other.

                          a - All.

                          r - Read the file.

                          w - Write or edit the file.

                          x - Execute or run the file as a program.

Tool: http://ss64.com/bash/chmod.html



cd dirname : change directory. you basically 'go' to another directory, and you will see the files in
that directory when you do 'ls'. you always start out in your 'home directory', and you can get back
there by typing 'cd' without arguments. 'cd ..' will get you one level up from your current position.

pwd : tells you where you currently are.

grep string filename(s) : looks for the string in the files. This can be useful a lot of purposes,
e.g. finding the right file among many, figuring out which is the right version of something, and even
doing serious corpus work. grep comes in several varieties (grep, egrep, and fgrep) and has a lot of
very flexible options. Check out the man pages if this sounds good to you.

mkdir dirname --- make a new directory
LIFE CYCLE

The Waterfall model (proposed by Royce)
each activity completes before the next activity starts
There is no repetition of activities.
The waterfall model is often used to plan activities within activities of more complex models.




there is often a requirement to check that the outputs of each activity not only satisfy the input
requirements but that the outputs also satisfy the ‘real-world’ requirements as well



As can be seen, the activities still progress from left to right, with each activity ‘signed-off’ before the
next commences.
But now there is validation of each stage of the implemented system.
Rapid Prototyping diagram
Methodology - SSADM (Structured Systems Analysis and Design Methodology) a

The main premise behind prototyping is that users don’t know what they really want.
The aim is to provide early ‘models’ of the final system which let users explore their needs better
than would be possible just by talking to an analyst.

There are two approaches to prototyping:
        • ‘throw-away’ prototypes, where early prototypes do not contribute to the final product
        • ‘evolutionary’ prototypes, where early prototypes build up into the final product - this is
           the most common form of prototyping today




The core of prototyping is the Prototype Iteration activity, where repeated prototypes are
developed, evaluated by users and refined

Prototyping has advantages in that the user feels (or should feel) more involved in the development
process

Also, based on the idea that it is easier to fix problems early in the development process, additional
attention is given to the earlier activities (those building up to the first prototype) - this leads to
lower maintenance costs.

An example given by Connell & Shafer suggests that something like 25% of the lifetime costs of
software might be saved by adopting a prototyping approach.

Prototyping allows users to see these errors at an early stage, thus allowing quick and cheap
correction.

Another rather significant problem is that performance of the final product may not be satisfactory,
due to the piecemeal way in which it is constructed

Rapid prototyping methodology - DSDM (Dynamic Systems Development Method)
Testing

Unit testing
           • testing and verifying single program units
 Integration testing
           • verifying the interfaces between units
 Regression testing
           • ensuring that changes do not affect existing parts of
           the system
Systems testing
           • ensuring a system meets its objectives
 Acceptance testing
           • ensures the system meets user requirements
--------------------------------------------------
“black box”
           • the tester only tests that the outputs are correct (as per
           the requirements specification) for given inputs
“white box”
           • examine the internal detail of units to verify that all the
           ‘code’ is functioning correctly

 Integration testing links white and black box testing
-------------------------------------------------
Black-Box Testing




So, if we can’t test every possible list, how many do we need to test?

We could take a statistical view of the problem, that by testing so-many lists we achieve such-and-
such a probability of the module functioning correctly for any lists.

Also we have to know things like whether the input list can contain duplicate values.

In this case we might build ‘test cases’as follows:
         • a zero-length list
         • one element lists
         • lists of length = a power of 2 (this, of
                   course, assumes that we know something
                   about how some sorting algorithms work!)
         • lists of length = a power of 2 minus 1

Thus a major drawback of black-box testing is that it is usually impossible exhaustively to test a
module
------------------------------------------------------------------------
White Box Testing

If necessary, we could trace the execution of program statements during testing to ensure that every
statement has been ‘exercised’.

Then we could design tests that would specifically target statements not normally executed.

Estimates of the percentage of actual ‘bugs’ detectable by testing varies between 50% and 70%.
--------------------------------------------------------
                                      Integration and System Testing

Tested modules are added to the system one at a time - if necessary ‘stubs’ or dummy modules are
used to simulate modules not yet added.

Eventually the completed system emerges and can be subjected to testing to ensure that it meets
specification and (easily forgotten) user requirements.

-------------------------------------------------------
Black-box testing in the context of the assignment is making sure that the pages and any cgi/php
scripts work when accessed through the browser -obviously this is vital as it is what will be seen by
the user.

--------------------------------------------------------
                                                           CGI

Internet "conversations" between two computers take place between a server and a client.

Using the http protocol web pages are displayed on the client.

CGI (Common Gateway Interface) programs run on the server (server side).

1. Form displayed on client
2. User enters data and ‘submits’ form to server. Data from form transmitted from client to server
3. Specified CGI program starts executing and collects transmitted data
4. Data processed and output page generated by CGI program. CGI program then terminates
5. Output page transmitted from server to client and displayed
Note that there are two components to the interaction
       • An original (usually blank) form (loaded as a normal webpage or generated by a program)
       • A CGI program (called from the form)

Creates a web page ‘on-the-fly’ for return to the client browser by writing appropriate HTML code to
the program output.

What happens when we start a browser (eg. IE) and request an off-site link?
       • The name of the remote server is resolved to an IP address using one or more DNS(Domain
                Name Server);
       • The remote server is contacted on a special port (default 80) using the http protocol;
       • The server verifies the client has legitimate access to the data and then accesses and
                transmits it;
       • The client browser decides how to treat the document (html, audio, video etc) – often with
                the help of plug-in software

How is the Client/Server operation modified for CGI Programming?
• The server provides the end user (client) with a blank HTML FORM
• Via a browser (usually) the user enters text or makes preferences/selections
• The user defined data (and other "hidden" information) is sent back to a CGI program on the web
         server
• The program processes the data and writes HTML (with a MIME header) back to the server - extra
header information is added if required - and the whole is sent to the client

Values passed from forms back to CGI programs are URL Encoded
------------------------------------
Two methods, GET and POST exist to communicate between the client and server.

GET is used to retrieve data from the server – the form data sent to the server is encoded as
name=value pairs in the URL e.g.

POST method is used to send information to the server – the form data is encoded within the body
of the message passed back to the server – the CGI can receive this via the standard input ‘file’
STDIN.

More Related Content

Viewers also liked (7)

PPTX
Ultimasdiapositivasproyecto
luzamparo1975
 
DOC
Exam2010
saywhatyousee
 
PPTX
Gather clothing from your neighbors and donate it
aigesha96
 
KEY
Focus
Jim Snodgrass
 
PDF
Představení eMAMS
Robin Pokorny
 
PDF
Sysdevrevi lect
saywhatyousee
 
PPTX
Gather clothing from your neighbors and donate it
aigesha96
 
Ultimasdiapositivasproyecto
luzamparo1975
 
Exam2010
saywhatyousee
 
Gather clothing from your neighbors and donate it
aigesha96
 
Představení eMAMS
Robin Pokorny
 
Sysdevrevi lect
saywhatyousee
 
Gather clothing from your neighbors and donate it
aigesha96
 

Similar to Unix commands (20)

PDF
Systems se
Franco Bressan
 
ODP
The Professional Programmer
Dave Cross
 
PDF
Python Cookbook 1st Edition Alex Martelli
bnisitek
 
PDF
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
PDF
Tutor Py
AkramWaseem
 
PPTX
Week 5
A VD
 
PPTX
Week 5
A VD
 
PDF
Tiny C Projects 1st Edition Daniel Gookin
bimoredilius
 
PDF
Python Cookbook_ Nho Vĩnh Share.pdf
Nho Vĩnh
 
PDF
Designing A Project Using Java Programming
Katy Allen
 
PDF
Perl-crash-course
tutorialsruby
 
PDF
Perl-crash-course
tutorialsruby
 
PDF
Perl-crash-course
tutorialsruby
 
PDF
Perl-crash-course
tutorialsruby
 
PPTX
Gnu linux for safety related systems
DTQ4
 
DOC
Perl web programming
Johnny Pork
 
DOCX
Faq
Anu j
 
PDF
Introduction to Linux with Focus on Raspberry Pi
David Horvath
 
PDF
Instant download Python Cookbook 1st Edition Alex Martelli pdf all chapter
fawalamond
 
PDF
Python Cookbook 1st Edition Alex Martelli
rheinoburt
 
Systems se
Franco Bressan
 
The Professional Programmer
Dave Cross
 
Python Cookbook 1st Edition Alex Martelli
bnisitek
 
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
Tutor Py
AkramWaseem
 
Week 5
A VD
 
Week 5
A VD
 
Tiny C Projects 1st Edition Daniel Gookin
bimoredilius
 
Python Cookbook_ Nho Vĩnh Share.pdf
Nho Vĩnh
 
Designing A Project Using Java Programming
Katy Allen
 
Perl-crash-course
tutorialsruby
 
Perl-crash-course
tutorialsruby
 
Perl-crash-course
tutorialsruby
 
Perl-crash-course
tutorialsruby
 
Gnu linux for safety related systems
DTQ4
 
Perl web programming
Johnny Pork
 
Faq
Anu j
 
Introduction to Linux with Focus on Raspberry Pi
David Horvath
 
Instant download Python Cookbook 1st Edition Alex Martelli pdf all chapter
fawalamond
 
Python Cookbook 1st Edition Alex Martelli
rheinoburt
 
Ad

Recently uploaded (20)

PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Ad

Unix commands

  • 1. UNIX COMMANDS is -l : lists your files in 'long format', which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified. cp filename1 filename2 : copies a file rm filename : removes a file. It is wise to use the option rm -i, which will ask you for confirmation before actually deleting anything. chmod options filename : lets you change the read, write, and execute permissions on your files. The default is that only you can look at them and change them. u - User who owns the file. g - Group that owns the file. o - Other. a - All. r - Read the file. w - Write or edit the file. x - Execute or run the file as a program. Tool: http://ss64.com/bash/chmod.html cd dirname : change directory. you basically 'go' to another directory, and you will see the files in that directory when you do 'ls'. you always start out in your 'home directory', and you can get back there by typing 'cd' without arguments. 'cd ..' will get you one level up from your current position. pwd : tells you where you currently are. grep string filename(s) : looks for the string in the files. This can be useful a lot of purposes, e.g. finding the right file among many, figuring out which is the right version of something, and even doing serious corpus work. grep comes in several varieties (grep, egrep, and fgrep) and has a lot of very flexible options. Check out the man pages if this sounds good to you. mkdir dirname --- make a new directory
  • 2. LIFE CYCLE The Waterfall model (proposed by Royce) each activity completes before the next activity starts There is no repetition of activities. The waterfall model is often used to plan activities within activities of more complex models. there is often a requirement to check that the outputs of each activity not only satisfy the input requirements but that the outputs also satisfy the ‘real-world’ requirements as well As can be seen, the activities still progress from left to right, with each activity ‘signed-off’ before the next commences. But now there is validation of each stage of the implemented system.
  • 3. Rapid Prototyping diagram Methodology - SSADM (Structured Systems Analysis and Design Methodology) a The main premise behind prototyping is that users don’t know what they really want. The aim is to provide early ‘models’ of the final system which let users explore their needs better than would be possible just by talking to an analyst. There are two approaches to prototyping: • ‘throw-away’ prototypes, where early prototypes do not contribute to the final product • ‘evolutionary’ prototypes, where early prototypes build up into the final product - this is the most common form of prototyping today The core of prototyping is the Prototype Iteration activity, where repeated prototypes are developed, evaluated by users and refined Prototyping has advantages in that the user feels (or should feel) more involved in the development process Also, based on the idea that it is easier to fix problems early in the development process, additional attention is given to the earlier activities (those building up to the first prototype) - this leads to lower maintenance costs. An example given by Connell & Shafer suggests that something like 25% of the lifetime costs of software might be saved by adopting a prototyping approach. Prototyping allows users to see these errors at an early stage, thus allowing quick and cheap correction. Another rather significant problem is that performance of the final product may not be satisfactory, due to the piecemeal way in which it is constructed Rapid prototyping methodology - DSDM (Dynamic Systems Development Method)
  • 4. Testing Unit testing • testing and verifying single program units Integration testing • verifying the interfaces between units Regression testing • ensuring that changes do not affect existing parts of the system Systems testing • ensuring a system meets its objectives Acceptance testing • ensures the system meets user requirements -------------------------------------------------- “black box” • the tester only tests that the outputs are correct (as per the requirements specification) for given inputs “white box” • examine the internal detail of units to verify that all the ‘code’ is functioning correctly Integration testing links white and black box testing ------------------------------------------------- Black-Box Testing So, if we can’t test every possible list, how many do we need to test? We could take a statistical view of the problem, that by testing so-many lists we achieve such-and- such a probability of the module functioning correctly for any lists. Also we have to know things like whether the input list can contain duplicate values. In this case we might build ‘test cases’as follows: • a zero-length list • one element lists • lists of length = a power of 2 (this, of course, assumes that we know something about how some sorting algorithms work!) • lists of length = a power of 2 minus 1 Thus a major drawback of black-box testing is that it is usually impossible exhaustively to test a module ------------------------------------------------------------------------
  • 5. White Box Testing If necessary, we could trace the execution of program statements during testing to ensure that every statement has been ‘exercised’. Then we could design tests that would specifically target statements not normally executed. Estimates of the percentage of actual ‘bugs’ detectable by testing varies between 50% and 70%. -------------------------------------------------------- Integration and System Testing Tested modules are added to the system one at a time - if necessary ‘stubs’ or dummy modules are used to simulate modules not yet added. Eventually the completed system emerges and can be subjected to testing to ensure that it meets specification and (easily forgotten) user requirements. ------------------------------------------------------- Black-box testing in the context of the assignment is making sure that the pages and any cgi/php scripts work when accessed through the browser -obviously this is vital as it is what will be seen by the user. -------------------------------------------------------- CGI Internet "conversations" between two computers take place between a server and a client. Using the http protocol web pages are displayed on the client. CGI (Common Gateway Interface) programs run on the server (server side). 1. Form displayed on client 2. User enters data and ‘submits’ form to server. Data from form transmitted from client to server 3. Specified CGI program starts executing and collects transmitted data 4. Data processed and output page generated by CGI program. CGI program then terminates 5. Output page transmitted from server to client and displayed
  • 6. Note that there are two components to the interaction • An original (usually blank) form (loaded as a normal webpage or generated by a program) • A CGI program (called from the form) Creates a web page ‘on-the-fly’ for return to the client browser by writing appropriate HTML code to the program output. What happens when we start a browser (eg. IE) and request an off-site link? • The name of the remote server is resolved to an IP address using one or more DNS(Domain Name Server); • The remote server is contacted on a special port (default 80) using the http protocol; • The server verifies the client has legitimate access to the data and then accesses and transmits it; • The client browser decides how to treat the document (html, audio, video etc) – often with the help of plug-in software How is the Client/Server operation modified for CGI Programming? • The server provides the end user (client) with a blank HTML FORM • Via a browser (usually) the user enters text or makes preferences/selections • The user defined data (and other "hidden" information) is sent back to a CGI program on the web server • The program processes the data and writes HTML (with a MIME header) back to the server - extra header information is added if required - and the whole is sent to the client Values passed from forms back to CGI programs are URL Encoded ------------------------------------ Two methods, GET and POST exist to communicate between the client and server. GET is used to retrieve data from the server – the form data sent to the server is encoded as name=value pairs in the URL e.g. POST method is used to send information to the server – the form data is encoded within the body of the message passed back to the server – the CGI can receive this via the standard input ‘file’ STDIN.