Your SlideShare is downloading. ×
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

02 t1 s2_linux_lesson2

358

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
358
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Commands used in Linux Operating SystemObjectivesIn this lesson, you will learn to: Create a directory using the mkdir command Delete a directory using the rmdir command List the contents of a directory using the ls command Copy a file using the cp command Move and renaming a file using the mv command Delete a file using the rm command Displaying the page content using more command©NIIT Linux/Lesson 2/Slide 1 of 17
  • 2. Commands used in Linux Operating SystemObjectives (contd:) Using Wildcard characters Use man command to get online help Functions of an Editor Create and Edit documents using the vi editor©NIIT Linux/Lesson 2/Slide 2 of 17
  • 3. Commands used in Linux Operating SystemDirectory Commands in Linux Identifying the Current Directory Path The pwd (print working directory) command is used to display the full path name of the current directory Changing the Current Directory The cd (change directory) command changes the current directory to the directory specified Creating a Directory The mkdir (make directory) command is used to create directories©NIIT Linux/Lesson 2/Slide 3 of 17
  • 4. Commands used in Linux Operating SystemDirectory Commands in Linux (contd.) Removing a Directory The rmdir (remove directory) command removes the directory specified Listing the Contents of a Directory The ls command is used to display the names of the files and sub-directories in a directory©NIIT Linux/Lesson 2/Slide 4 of 17
  • 5. Commands used in Linux Operating SystemFile Commands in Linux The cat (concatenate) command displays the contents of the specified file Copying Files The cp (copy) command duplicates the contents of the source file into a target file cp [options] source file/s destination directory/file Removing Files The rm (remove) command is used to delete files or directories rm [options] file/s©NIIT Linux/Lesson 2/Slide 5 of 17
  • 6. Commands used in Linux Operating SystemFile Commands in Linux (contd.) Moving and Renaming Files The mv (move) command is used to move a file or directory from one location to another or to change its name mv [option] source destination Displaying the Contents Page–Wise The more command is used to display data one screen-full at a time. While viewing a file using the more command, once you have scrolled down, you cannot move up more [options] filename©NIIT Linux/Lesson 2/Slide 6 of 17
  • 7. Commands used in Linux Operating SystemFile Commands in Linux (contd.) Displaying the Contents Page–Wise (contd.) The less command is similar to the more command except that you can scroll upwards also while viewing the contents of a file less [options] filenameWildcard Characters The shell offers the facility to perform an operation on a set of files by the use of certain special characters in the command in place of the actual file names©NIIT Linux/Lesson 2/Slide 7 of 17
  • 8. Commands used in Linux Operating SystemFile Commands in Linux (contd.)Wildcard Characters (contd.) The * Wildcard The * wildcard is interpreted as a string of none, one, or more characters The ? Wildcard The ? wildcard matches exactly one occurrence of any character The [ ] Wildcard The [ ] wildcard can be used to restrict the characters to be matched©NIIT Linux/Lesson 2/Slide 8 of 17
  • 9. Commands used in Linux Operating SystemGetting Online Help The man command is used to get online help to a user about the various options for any command in Linux man command name©NIIT Linux/Lesson 2/Slide 9 of 17
  • 10. Commands used in Linux Operating SystemEditors A text editor is used to create and manage text files and documents. An editor is an application software that is usually bundled with an operating system (OS). Functions of an Editor Create a file Open an existing file Copy and Paste text Search for text Handle a large amount of data©NIIT Linux/Lesson 2/Slide 10 of 17
  • 11. Commands used in Linux Operating SystemThe vi EditorThe vi editor is a visual editor used to create and edittext files, documents, and programs. In Red Hat Linux,vi is a symbolic link to the vim editor, which is animproved version of the vi editor.Getting Started with vi The vi editor is invoked by giving the following command at the Linux prompt: ® vi filename Enter©NIIT Linux/Lesson 2/Slide 11 of 17
  • 12. Commands used in Linux Operating SystemEditors A text editor is used to create and manage text files and documents. An editor is an application software that is usually bundled with an operating system (OS). Functions of an Editor Create a file Open an existing file Copy and Paste text Search for text Handle a large amount of data©NIIT Linux/Lesson 2/Slide 12 of 17
  • 13. Commands used in Linux Operating SystemThe vi EditorThe vi editor is a visual editor used to create and edittext files, documents, and programs. In Red Hat Linux,vi is a symbolic link to the vim editor, which is animproved version of the vi editor.Getting Started with vi The vi editor is invoked by giving the following command at the Linux prompt: ® vi filename Enter©NIIT Linux/Lesson 2/Slide 13 of 17
  • 14. Commands used in Linux Operating SystemVi Editor(contd:) You can use the following commands to exit vi editor :x ZZ :q!©NIIT Linux/Lesson 2/Slide 14 of 17
  • 15. Commands used in Linux Operating SystemSummaryIn this lesson, you learned that: some of the common directory commands used in Linux are: • pwd • cd • mkdir • rmdir • ls©NIIT Linux/Lesson 2/Slide 15 of 17
  • 16. Commands used in Linux Operating SystemSummary (contd.) some of the common file commands used in Linux are: • Cat • Cp • Rm • Mv • More • less The shell offers the facility to perform an operation on a set of files by using the wildcard pattern.©NIIT Linux/Lesson 2/Slide 16 of 17
  • 17. Commands used in Linux Operating SystemSummary (contd.) Some of the commonly used wildcard characters are:• ? – Matches one character in a file• * - Matches zero, one, or more than one character in a file name• [ ] – Matches one character from the enclosed list The man command is used to get online help to a user about the various options for any command in Linux The vi editor is used to create and edit documents©NIIT Linux/Lesson 2/Slide 17 of 17

×