SlideShare uma empresa Scribd logo
1 de 10
LINUX

  Linux was officially introduced in 1991 by its creator Linus Torvalds, who at the
time was a student at the University of Helsinki in Fuland. His creation grew in size
and popularity to the extent it has today.


Point Of Interest

1. Linux is perhaps the single largest collaborative effort in the IT world today. It is
now used in several computing devices from PCS in homes to handheld.


2. Three years later, in 1994, Red Hat Linux and Caldera were released. Red Hat is
by far the most popular distribution of Linux Several distribution exist today.


3. There are over 300 distribution of Linux, most of them containing commonly
needed applications and even games.


4. Linux was originally meant to be a UNIX clone. But Linux does not contain a
single line of UNIX code the source code of the two is entirely different.


5. Most servers today run on Linux.


6. Linux is not just as OS you use at home instead of Windows – a whole range of
enterprise suites are now based on the Linux platform. Form network servers to Web
Servers, several places have Linux as the backbone.


7. Linux has one of the best online support available.


8. Linux mascot / Logo is a penguin.

Windows application could be run from Linux via an application called Crossover
Office or through another application called WINE.
LINUX COMMANDS AND FILTERS



LINUX COMMANDS AND FILTERS

Some Very Useful, Basic Commands

   The first command you learn in any OS – is display files in a directory: in DOS. You
would type “dir” to display the contents of a folder. In Linux, the equivalent is the “Ls”
command. This command displays the files and folders in the current directory. The “Ls”
command comes with some extra options; “Ls – l” produces a “long list” that shows the
owner, group size. Date modified and permission. “LS – a” will list hidden files as well. In
DOS. This is done by “dir fa”. There are other options- which we will leave to you to explore.

Listing Files and Directories

       Ls ( list )

When you first login, your current working directory is your home directory. Your home
directory has the same name as your user – name, for example, mystyleminx and it is where
your personal files and sub directories are saved.

To Find out what is in your home directory, type

             % ls ( short for list )

The Ls command lists the contents of your current working directory.
There may be no files visible in your home directory in which case, the UNIX prompt will be
returned. Alternatively, there may already be some files inserted by the System Administrator
when your account was created.
Ls does not, in fact, cause all the files in your home directory to be listed, but only those one
whose name does not begin with a dot ( . ) Files beginning with a dot ( . ) are known as hidden
files and usually contain important program configuration information. They are hidden
because you should not change them unless you are very familiar with UNIX!!!

         To list all files in your home directory including those whose names begin with a dot,
type
                 % ls –a

     Ls is an example of a command which can take options: -a is an example of an option.
The options change the behavior of the command. There are online manual pages that tell you
which options a particular command can take, and how each option modifies the behavior of
the command.
Wildcards

   The characters * and ? : The character * is called a wildcard, and will match against none
or more character(s) in a file (or directory ) name. For example, in your mystyleminx
directory, type

               % ls list*
This will list all files in the current directory starting with list…..


Try Typing

          % ls list*

This will list all files in the current directory ending with list…..
The character ? will match exactly one character. So ls ?ouse will match files like house and
mouse, but not grouse.




Chmod ( changing a file mode )

  Only the owner of a file can use chmod to change the permissions of a file. The options of
chmod are as follows:


        Symbol                                                Meaning

U                                                      user
          G                                                    group
          O                                                    other
          A                                                    all
          R                                                    read
          W                                                    write (and delete)
          X                                                    execute (and access directory)
          +                                                    add permission
          -                                                   Take away permission


For example, to remove read write and execute permissions on the file mystylepro for the
group and other, type

% chmod go-rwx mystylepro
This will leave the other permission unaffected.
To give read and write permissions on the file mystylepro to all.

       % chmod a+rw mystylepro

Making Directories

       mkdir ( make directory )

We will now make a subdirectory in your home directory to hold the files you will be creating
and using. To make a subdirectory called mystyleminx in your current working directory type

       % mkdir mystyleminx

To see the directory you have just created, type

       % ls



Changing to a different directory

      cd ( change directory )

The command cd directory means change the current working directory to „directory‟. The
current working directory may be thought of as the directory you are in, i.e. your current
position in the
file - system tree.

      To change to the directory you have just made, type

              % cd mystyleminx

Type ls to see the contents (which should be empty)

The Directories . and ..

    In UNIX, ( . ) means the current directory, so typing

         % cd .

( ..) meant the parent of the current directory, so typing

           % cd ..
will take you one directory up the hierarchy (back to your home directory).
Pathnames

      pwd (print working directory)

Pathnames enable you to work out where you are in relation to the whole file – system.
For example, to find out the absolute pathname of your home – directory, type cd to get back
to your home – directory and then type

         % pwd

The full pathname will look something like this:

       /home/student/poly/mystyleminx

Which means that mystyleminx (your home directory) is in the directory poly, which is located
on the student under home directory.




      Note:

          Ls                             List files and directories
       Ls – a                          List all files and directories
       Mkdir                          make a directory
       cd directory                  change to named directory
       cd                             change to home – directory
       cd ~                           change to home – directory
       cd..                           change to parent directory
       pwd                            display the path of the current directory

  Copying Files

      cp (copy)

cp file1 file 2 is the command which makes a copy of file1 in the current working directory
and calls it file2
       What we are going to do now, is to take a file stored in an open access area of the file
system, and use the cp command to copy its to your mystyleminx directory.

      % cp/home/student/file.txt /home
The above command means copy file1.txt from /home/student to the /home directory, keeping
the same name.

Moving files

       mv (move)

       mv file1 file2 moves ( or renames ) file1 to file2

To move a file from one place to another, use the mv command. This has the effect of moving
rather than copying the file, so you end up with only one file rather that two.
          It can also be used to rename a file, by moving the file to the same directory, but giving
it a different name.
         We now move the file mystylepro.bak to backup directory.

            % mc mystylepro.bak backups/.

Removing Files and Directories

      rm (remove), rmdir (remove directory)

To delete (remove) a file, use the rm command. As an example, we are going to create a copy
of the mystylepro.txt file then delete it.

            % cp mystylepro.txt tempfile.txt
            % ls (to check if it has created the file )
            % rm tempfile.txt
            % ls (to check if it has deleted the file)

     Displaying the contents of a file on the screen.

Clear ( clear screen )

  Before you start the next section, you may like to clear the terminal windows of the previous
commands so the output of the following commands can be clearly understood.

   At the prompt, type

        % clear

This will clear all text and leave you with the % prompt at the top of the window.

Cat ( Concatenate )

  The command cat can be used to display the contents of a file on the screen. Type:
% cat mystylepro.txt
As you can see, the file is longer than the size of the window, so it scrolls past making it
unreadable.

wc ( Word Count )

   A handy little utility is the wc command, short for word count. To do a word count on
mystylepro.txt, type

        % wc –w mystylepro.txt

To find out how many line the file has, type

        % wc –l mystylepro.txt

Redirection

      Redirecting the Output (Outward Redirection): We use the > symbol to redirect the
output of a command. For example, to create a file called list1 containing a list of students,
type:

          % cat > list1

Then type in the names of some students. Press [Return] after each one.
        Anmol
        Deependra
        Aditya
        ^D (control D to stop and Save )

What happens is the cat command reads the standard input ( the keyboard ) and the >
redirects the output, which normally goes to the screen, into a file called list1

      To read the contents of the file, type
             % cat list1

Append To File

The form >> appends standard output to a file. So to add more items to the file list1, type

        % cat >> list1

Then type in the names of more students
        Aslam
        Anil
        Ankita
Amit
         Anjali
         ^D (control to stop and save)

To read the contents of the file, type

       % cat list1

You should now have two files. One contain Three names of students, the other contains five
students. We will now use the cat command to join (concatenate ) list1 and list2 into a new file
called mystyleinside. Type

          % cat list1 list2 > mystyleinside

What this is doing is reading the contents of list1 and list2 in turn, then out putting the text to
the file mystyleinside

     To read the contents of the new file, type

            % cat mystyleinside

Redirecting the Input ( Inward Redirection )

       We use the < symbol to redirect the input of a command.
The command sort alphabetically or numerically sorts a list. Type

        % sort




Then type in the names of some students. Press [Return] after each one.

         Zoro
         Love
         Mintu
         ^D (control to stop and save)

The Output will be

        Love
        Mintu
        Zoro

Using < you can redirect the input to come from a file rather than the keyboard. For example,
to sort the list of students, type

         % sort < mystyleinside

And the sorted list will be output to the screen.

    To output the sorted list to a file, type,

            % sort < mystyleinside > list
Use cat to read the contents of the files list


More On Linux



Getting Help

   On line Manuals: There are on – line manuals which gives information about most
commands. The manual pages tell you which options a particular command can take, and
how each option modifies the behavior of the command. Type man command to read the
manual page for a particular command.

      For example, to find out more about the wc ( word count ) command, type

          % man wc

Alternatively

      % whatis wc

Other Useful LINUX Commands

   Compress: This reduces the size of a file, thus freeing valuable disk space. For example,
type

        % ls – l mystylepro.txt

And note the size of the file. Then to compress mystylepro.txt, type

            % compress mystylepro.txt

This will compress the file and place it in a file called mystylepro.txt.Z
To see the change in size, type ls – l again.
To uncompress the file, use the uncompress command.
% uncompress mystylepro.txt.Z

gzip: This also compress a file, and is more efficient than compress. For example, to zip
mystylepro.txt, type

       % gzip mystylepro.txt

This will zip the file and place it in a file called mystylepro.txt.gz
To unzip the file, use the gunzip command.

      % gunzip mystylepro.txt.gz

 File: File classifies the named files according to the type of data contain, for example ASCII
(text), pictures, compressed data, etc. To report on all files in your home directory, type

       % file *

History: The C shell keeps an ordered list of all the commands that you have entered. Each
command is given a number according to the order it was entered.

       % history (show command history list )

If you are using the C shell, you can use the exclamation character ( ! ) to recall commands
easily.

         % !! ( recall last command )
         % ! – 3 ( recall third most recent command )
         % !5 (recall 5th command in list )
         % ! grep (recall last command starting with grep )

You can increase the size of the history buffer by typing
      % set history = 100

Mais conteúdo relacionado

Mais procurados

Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesNoé Fernández-Pozo
 
Applecmdlista zs
Applecmdlista zsApplecmdlista zs
Applecmdlista zsBen Pope
 
Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Noé Fernández-Pozo
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testingGaruda Trainings
 
Linux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for BeginnersLinux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for BeginnersDavide Ciambelli
 
PC Software - Computer Application - Office Automation Tools
PC Software  -  Computer Application - Office Automation ToolsPC Software  -  Computer Application - Office Automation Tools
PC Software - Computer Application - Office Automation Toolszatax
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX CommandsSubra Das
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualKuntal Bhowmick
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS
 
Internal commands of dos
Internal commands of dosInternal commands of dos
Internal commands of dosNargiskhan786
 
Unix / Linux Command Reference
Unix / Linux Command ReferenceUnix / Linux Command Reference
Unix / Linux Command ReferenceSumankumar Panchal
 
Unit3 browsing the filesystem
Unit3 browsing the filesystemUnit3 browsing the filesystem
Unit3 browsing the filesystemroot_fibo
 
intro unix/linux 09
intro unix/linux 09intro unix/linux 09
intro unix/linux 09duquoi
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)meashi
 

Mais procurados (20)

Linux commands
Linux commandsLinux commands
Linux commands
 
Introduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examplesIntroduction to UNIX Command-Lines with examples
Introduction to UNIX Command-Lines with examples
 
Basic unix commands_1
Basic unix commands_1Basic unix commands_1
Basic unix commands_1
 
Applecmdlista zs
Applecmdlista zsApplecmdlista zs
Applecmdlista zs
 
Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014
 
Linux cheat-sheet
Linux cheat-sheetLinux cheat-sheet
Linux cheat-sheet
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testing
 
Linux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for BeginnersLinux Bash Shell Cheat Sheet for Beginners
Linux Bash Shell Cheat Sheet for Beginners
 
PC Software - Computer Application - Office Automation Tools
PC Software  -  Computer Application - Office Automation ToolsPC Software  -  Computer Application - Office Automation Tools
PC Software - Computer Application - Office Automation Tools
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
 
Linux
LinuxLinux
Linux
 
Linux class 8 tar
Linux class 8   tar  Linux class 8   tar
Linux class 8 tar
 
Linux comands for Beginners
Linux comands for BeginnersLinux comands for Beginners
Linux comands for Beginners
 
Basic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manualBasic shell programs assignment 1_solution_manual
Basic shell programs assignment 1_solution_manual
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
 
Internal commands of dos
Internal commands of dosInternal commands of dos
Internal commands of dos
 
Unix / Linux Command Reference
Unix / Linux Command ReferenceUnix / Linux Command Reference
Unix / Linux Command Reference
 
Unit3 browsing the filesystem
Unit3 browsing the filesystemUnit3 browsing the filesystem
Unit3 browsing the filesystem
 
intro unix/linux 09
intro unix/linux 09intro unix/linux 09
intro unix/linux 09
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 

Destaque

Cv di guglielmo-ita
Cv di guglielmo-itaCv di guglielmo-ita
Cv di guglielmo-itaadridigu
 
Cv di guglielmo-eng
Cv di guglielmo-engCv di guglielmo-eng
Cv di guglielmo-engadridigu
 
WAP to implement inheritance and overloading methods in java
WAP to implement inheritance and overloading methods in javaWAP to implement inheritance and overloading methods in java
WAP to implement inheritance and overloading methods in javaOne97 Communications Limited
 
WAP to store 10 numbers in an array and find out the largest and the smallest...
WAP to store 10 numbers in an array and find out the largest and the smallest...WAP to store 10 numbers in an array and find out the largest and the smallest...
WAP to store 10 numbers in an array and find out the largest and the smallest...One97 Communications Limited
 

Destaque (18)

Computer Forensics
Computer ForensicsComputer Forensics
Computer Forensics
 
Neural Interfacing
Neural Interfacing Neural Interfacing
Neural Interfacing
 
Backtrack
BacktrackBacktrack
Backtrack
 
Blue eye technology
Blue eye technology Blue eye technology
Blue eye technology
 
Fcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt ChartFcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt Chart
 
Cv di guglielmo-ita
Cv di guglielmo-itaCv di guglielmo-ita
Cv di guglielmo-ita
 
Cv di guglielmo-eng
Cv di guglielmo-engCv di guglielmo-eng
Cv di guglielmo-eng
 
E - Ball Computer
E - Ball ComputerE - Ball Computer
E - Ball Computer
 
WAP to implement inheritance and overloading methods in java
WAP to implement inheritance and overloading methods in javaWAP to implement inheritance and overloading methods in java
WAP to implement inheritance and overloading methods in java
 
WAP to store 10 numbers in an array and find out the largest and the smallest...
WAP to store 10 numbers in an array and find out the largest and the smallest...WAP to store 10 numbers in an array and find out the largest and the smallest...
WAP to store 10 numbers in an array and find out the largest and the smallest...
 
WAP to add two given matrices in Java
WAP to add two given matrices in JavaWAP to add two given matrices in Java
WAP to add two given matrices in Java
 
programming for Calculator in java
programming for Calculator in javaprogramming for Calculator in java
programming for Calculator in java
 
Topology
TopologyTopology
Topology
 
Advanced Computer E - Ball
Advanced Computer E - BallAdvanced Computer E - Ball
Advanced Computer E - Ball
 
Constructor Overloading in java
Constructor Overloading in javaConstructor Overloading in java
Constructor Overloading in java
 
Method overriding in java
Method overriding in javaMethod overriding in java
Method overriding in java
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Protect Folders without using any Software
Protect Folders without using any SoftwareProtect Folders without using any Software
Protect Folders without using any Software
 

Semelhante a Linux

linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.pptLuigysToro
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structureSreenatha Reddy K R
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritpingchockit88
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsBITS
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command ShellTushar B Kute
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdfamitkamble79
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.pptMeesanRaza
 
Linux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandLinux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandbhatvijetha
 
Treebeard's Unix Cheat Sheet
Treebeard's Unix Cheat SheetTreebeard's Unix Cheat Sheet
Treebeard's Unix Cheat Sheetwensheng wei
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to LinuxDimas Prasetyo
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration trainingiman darabi
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338Cam YP Co., Ltd
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)anandvaidya
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338Cam YP Co., Ltd
 

Semelhante a Linux (20)

linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
LinuxLabBasics.ppt
LinuxLabBasics.pptLinuxLabBasics.ppt
LinuxLabBasics.ppt
 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
 
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
 
Linux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls commandLinux directory commands:more options on cd and ls command
Linux directory commands:more options on cd and ls command
 
Treebeard's Unix Cheat Sheet
Treebeard's Unix Cheat SheetTreebeard's Unix Cheat Sheet
Treebeard's Unix Cheat Sheet
 
Directories description
Directories descriptionDirectories description
Directories description
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 

Mais de One97 Communications Limited (14)

Er. Model Of Hospital Management
Er. Model Of Hospital ManagementEr. Model Of Hospital Management
Er. Model Of Hospital Management
 
Financial
FinancialFinancial
Financial
 
Railway
RailwayRailway
Railway
 
Library
LibraryLibrary
Library
 
WAP to invoke constructors using super keyword in java
WAP to invoke constructors using super keyword in javaWAP to invoke constructors using super keyword in java
WAP to invoke constructors using super keyword in java
 
WAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in javaWAP to find out whether the number is prime or not in java
WAP to find out whether the number is prime or not in java
 
Overriding abstract in java
Overriding abstract in javaOverriding abstract in java
Overriding abstract in java
 
How to achieve multiple inheritances by using interface in java
How to achieve multiple inheritances by using interface in java How to achieve multiple inheritances by using interface in java
How to achieve multiple inheritances by using interface in java
 
program on Function overloading in java
program on  Function overloading in javaprogram on  Function overloading in java
program on Function overloading in java
 
Program on usage of Final keyword in java
Program on usage of  Final keyword in javaProgram on usage of  Final keyword in java
Program on usage of Final keyword in java
 
WAP to initialize different objects with different values in java
WAP to initialize different objects with different values in javaWAP to initialize different objects with different values in java
WAP to initialize different objects with different values in java
 
Conversion of data types in java
Conversion of data types in javaConversion of data types in java
Conversion of data types in java
 
Uses
UsesUses
Uses
 
Other
OtherOther
Other
 

Último

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 

Último (20)

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Linux

  • 1. LINUX Linux was officially introduced in 1991 by its creator Linus Torvalds, who at the time was a student at the University of Helsinki in Fuland. His creation grew in size and popularity to the extent it has today. Point Of Interest 1. Linux is perhaps the single largest collaborative effort in the IT world today. It is now used in several computing devices from PCS in homes to handheld. 2. Three years later, in 1994, Red Hat Linux and Caldera were released. Red Hat is by far the most popular distribution of Linux Several distribution exist today. 3. There are over 300 distribution of Linux, most of them containing commonly needed applications and even games. 4. Linux was originally meant to be a UNIX clone. But Linux does not contain a single line of UNIX code the source code of the two is entirely different. 5. Most servers today run on Linux. 6. Linux is not just as OS you use at home instead of Windows – a whole range of enterprise suites are now based on the Linux platform. Form network servers to Web Servers, several places have Linux as the backbone. 7. Linux has one of the best online support available. 8. Linux mascot / Logo is a penguin. Windows application could be run from Linux via an application called Crossover Office or through another application called WINE.
  • 2. LINUX COMMANDS AND FILTERS LINUX COMMANDS AND FILTERS Some Very Useful, Basic Commands The first command you learn in any OS – is display files in a directory: in DOS. You would type “dir” to display the contents of a folder. In Linux, the equivalent is the “Ls” command. This command displays the files and folders in the current directory. The “Ls” command comes with some extra options; “Ls – l” produces a “long list” that shows the owner, group size. Date modified and permission. “LS – a” will list hidden files as well. In DOS. This is done by “dir fa”. There are other options- which we will leave to you to explore. Listing Files and Directories Ls ( list ) When you first login, your current working directory is your home directory. Your home directory has the same name as your user – name, for example, mystyleminx and it is where your personal files and sub directories are saved. To Find out what is in your home directory, type % ls ( short for list ) The Ls command lists the contents of your current working directory. There may be no files visible in your home directory in which case, the UNIX prompt will be returned. Alternatively, there may already be some files inserted by the System Administrator when your account was created. Ls does not, in fact, cause all the files in your home directory to be listed, but only those one whose name does not begin with a dot ( . ) Files beginning with a dot ( . ) are known as hidden files and usually contain important program configuration information. They are hidden because you should not change them unless you are very familiar with UNIX!!! To list all files in your home directory including those whose names begin with a dot, type % ls –a Ls is an example of a command which can take options: -a is an example of an option. The options change the behavior of the command. There are online manual pages that tell you which options a particular command can take, and how each option modifies the behavior of the command.
  • 3. Wildcards The characters * and ? : The character * is called a wildcard, and will match against none or more character(s) in a file (or directory ) name. For example, in your mystyleminx directory, type % ls list* This will list all files in the current directory starting with list….. Try Typing % ls list* This will list all files in the current directory ending with list….. The character ? will match exactly one character. So ls ?ouse will match files like house and mouse, but not grouse. Chmod ( changing a file mode ) Only the owner of a file can use chmod to change the permissions of a file. The options of chmod are as follows: Symbol Meaning U user G group O other A all R read W write (and delete) X execute (and access directory) + add permission - Take away permission For example, to remove read write and execute permissions on the file mystylepro for the group and other, type % chmod go-rwx mystylepro
  • 4. This will leave the other permission unaffected. To give read and write permissions on the file mystylepro to all. % chmod a+rw mystylepro Making Directories mkdir ( make directory ) We will now make a subdirectory in your home directory to hold the files you will be creating and using. To make a subdirectory called mystyleminx in your current working directory type % mkdir mystyleminx To see the directory you have just created, type % ls Changing to a different directory cd ( change directory ) The command cd directory means change the current working directory to „directory‟. The current working directory may be thought of as the directory you are in, i.e. your current position in the file - system tree. To change to the directory you have just made, type % cd mystyleminx Type ls to see the contents (which should be empty) The Directories . and .. In UNIX, ( . ) means the current directory, so typing % cd . ( ..) meant the parent of the current directory, so typing % cd .. will take you one directory up the hierarchy (back to your home directory).
  • 5. Pathnames pwd (print working directory) Pathnames enable you to work out where you are in relation to the whole file – system. For example, to find out the absolute pathname of your home – directory, type cd to get back to your home – directory and then type % pwd The full pathname will look something like this: /home/student/poly/mystyleminx Which means that mystyleminx (your home directory) is in the directory poly, which is located on the student under home directory. Note: Ls List files and directories Ls – a List all files and directories Mkdir make a directory cd directory change to named directory cd change to home – directory cd ~ change to home – directory cd.. change to parent directory pwd display the path of the current directory Copying Files cp (copy) cp file1 file 2 is the command which makes a copy of file1 in the current working directory and calls it file2 What we are going to do now, is to take a file stored in an open access area of the file system, and use the cp command to copy its to your mystyleminx directory. % cp/home/student/file.txt /home
  • 6. The above command means copy file1.txt from /home/student to the /home directory, keeping the same name. Moving files mv (move) mv file1 file2 moves ( or renames ) file1 to file2 To move a file from one place to another, use the mv command. This has the effect of moving rather than copying the file, so you end up with only one file rather that two. It can also be used to rename a file, by moving the file to the same directory, but giving it a different name. We now move the file mystylepro.bak to backup directory. % mc mystylepro.bak backups/. Removing Files and Directories rm (remove), rmdir (remove directory) To delete (remove) a file, use the rm command. As an example, we are going to create a copy of the mystylepro.txt file then delete it. % cp mystylepro.txt tempfile.txt % ls (to check if it has created the file ) % rm tempfile.txt % ls (to check if it has deleted the file) Displaying the contents of a file on the screen. Clear ( clear screen ) Before you start the next section, you may like to clear the terminal windows of the previous commands so the output of the following commands can be clearly understood. At the prompt, type % clear This will clear all text and leave you with the % prompt at the top of the window. Cat ( Concatenate ) The command cat can be used to display the contents of a file on the screen. Type:
  • 7. % cat mystylepro.txt As you can see, the file is longer than the size of the window, so it scrolls past making it unreadable. wc ( Word Count ) A handy little utility is the wc command, short for word count. To do a word count on mystylepro.txt, type % wc –w mystylepro.txt To find out how many line the file has, type % wc –l mystylepro.txt Redirection Redirecting the Output (Outward Redirection): We use the > symbol to redirect the output of a command. For example, to create a file called list1 containing a list of students, type: % cat > list1 Then type in the names of some students. Press [Return] after each one. Anmol Deependra Aditya ^D (control D to stop and Save ) What happens is the cat command reads the standard input ( the keyboard ) and the > redirects the output, which normally goes to the screen, into a file called list1 To read the contents of the file, type % cat list1 Append To File The form >> appends standard output to a file. So to add more items to the file list1, type % cat >> list1 Then type in the names of more students Aslam Anil Ankita
  • 8. Amit Anjali ^D (control to stop and save) To read the contents of the file, type % cat list1 You should now have two files. One contain Three names of students, the other contains five students. We will now use the cat command to join (concatenate ) list1 and list2 into a new file called mystyleinside. Type % cat list1 list2 > mystyleinside What this is doing is reading the contents of list1 and list2 in turn, then out putting the text to the file mystyleinside To read the contents of the new file, type % cat mystyleinside Redirecting the Input ( Inward Redirection ) We use the < symbol to redirect the input of a command. The command sort alphabetically or numerically sorts a list. Type % sort Then type in the names of some students. Press [Return] after each one. Zoro Love Mintu ^D (control to stop and save) The Output will be Love Mintu Zoro Using < you can redirect the input to come from a file rather than the keyboard. For example,
  • 9. to sort the list of students, type % sort < mystyleinside And the sorted list will be output to the screen. To output the sorted list to a file, type, % sort < mystyleinside > list Use cat to read the contents of the files list More On Linux Getting Help On line Manuals: There are on – line manuals which gives information about most commands. The manual pages tell you which options a particular command can take, and how each option modifies the behavior of the command. Type man command to read the manual page for a particular command. For example, to find out more about the wc ( word count ) command, type % man wc Alternatively % whatis wc Other Useful LINUX Commands Compress: This reduces the size of a file, thus freeing valuable disk space. For example, type % ls – l mystylepro.txt And note the size of the file. Then to compress mystylepro.txt, type % compress mystylepro.txt This will compress the file and place it in a file called mystylepro.txt.Z To see the change in size, type ls – l again. To uncompress the file, use the uncompress command.
  • 10. % uncompress mystylepro.txt.Z gzip: This also compress a file, and is more efficient than compress. For example, to zip mystylepro.txt, type % gzip mystylepro.txt This will zip the file and place it in a file called mystylepro.txt.gz To unzip the file, use the gunzip command. % gunzip mystylepro.txt.gz File: File classifies the named files according to the type of data contain, for example ASCII (text), pictures, compressed data, etc. To report on all files in your home directory, type % file * History: The C shell keeps an ordered list of all the commands that you have entered. Each command is given a number according to the order it was entered. % history (show command history list ) If you are using the C shell, you can use the exclamation character ( ! ) to recall commands easily. % !! ( recall last command ) % ! – 3 ( recall third most recent command ) % !5 (recall 5th command in list ) % ! grep (recall last command starting with grep ) You can increase the size of the history buffer by typing % set history = 100