SlideShare a Scribd company logo
1 of 9
R.D.SIVAKUMAR, M.Sc.,M.Phil.,M.Tech.,
Assistant Professor of Computer Science &
Assistant Professor and Head, Department of M.Com.(CA),
Ayya Nadar Janaki Ammal College,
Sivakasi – 626 124.
Mobile: 099440-42243
e-mail : sivamsccsit@gmail.com
website: www.rdsivakumar.blogspot.in
Directory Commands
Directory Commands
The first thing that you are expected to know is some fundamental
concepts of commands. The general format of a command is:
Command option argument
Not all commands need the “option” and “argument”. Some needs option alone some
needs argument alone and while others need both.
For example ls (abbreviation for list but do not try to help the system by typing list
instead of ls. This helping action is greeted with an error message. The command ls saves
you from typing two more characters, but it adds human memory load.) command works
without option and argument, with argument alone, with option alone and with both.
Argument usually refers the name of the file on which the command should work with.
It should start with an alphabet. Some system files called dot files start with a . (dot).
Directory Commands
In the Fig. 3.1 even though there are two bins and two personal directories,
they can be uniquely identified by the system because of the path name. The path
names for the bin directories are /bin and / usr/bin. The first slash (/) always
represents the root directory.
As already stated, a slash before the first directory in the path, represents the
root. Path name also applies to files. The file is created within a directory by
specifying a name. The system identifies the file with filename combined with the
path of the directories from the root to the file’s directory.
Path names are of two types. They are
1. the Absolute path name and
2. the Relative path name.
An absolute path name is the complete path name of a file or directory
starting with root directory.
A relative path name begins with your working directory. It is the path of the file
relative to your working directory.
Directory Commands
Changing the Current Directory
The cd (change directory) command changes the current directory to the
specified directory. For example the current user ilamathi wants to switch over
from her home directory to /usr/bin. She first finds out the current directory to
ascertain her position and then she switches over to /usr/ bin. She executes the
following commands at the command prompt.
[ilamathi@localhost ilamathi] $ pwd
/home/ilamathi
[ilamathi@localhost ilamathi] $ cd /usr/bin
[ilamathi@localhost bin ] $ pwd
/usr/bin
If she wants to move to parent directory of the current directory then she has
to use cd .. at the $ prompt. cd command will not show the directory on the
screen. To show the directory, pwd command should be given at the $ prompt.
Note: The double dots (..) denote the path of parent directory. The single dot(.)
represents the directory itself. There should be a blank space between cd and ..
and there should be no blank space between the two dots
Directory Commands
Creating a Directory
The user kumaran wants to create an insurance directory under his health
directory. He is already in the health directory. He should make use of mkdir (make
directory) command.
 This command creates the directory specified after the mkdir command, under
the current directory. But the newly created directory will not become the current
directory automatically. If you want move to the newly created directory you have
to make use of cd command.
[kumaran@localhost health] $ mkdir insurance
A new directory under health is created. You can specify the full path to make a
directory with mkdir command
Directory Commands
Removing a Directory
When there is a provision to make a directory, there should be a provision to
remove a directory also. Can you guess the command? Yes, you are right! It is
rmdir (remove directory).
Example:
[kumaran@localhost health] $ rmdir insurance
If you want remove a directory, the directory
1) should be empty and
2) should not be the current directory.
Kumaran did not store any thing in the insurance and the current directory is
only health not insurance. So, it is possible to delete the insurance directory.
If you want to remove a directory, which is not empty, you can make use of rm
command, which will be discussed shortly. As in the case of mkdir command, you
can use full path.
Directory Commands
Listing the Contents of a Directory
Suppose you want to find out the name of the files and the subdirectories of a
directory, ls is the only candidate to achieve this. For example the user Kumaran
wants to know the names of the files and directories of
/home/kumaran, he must give the following command.
[kumaran@localhost kumaran] $ ls /home/kumaran
healthcprogramming c++programming personal.
[kumaran@localhost kumaran] $ ls - F
health / cprogramming c++ programming personal /
The option -F adds / at the end of the directories and sub-directories.
Directory Commands
Listing the Contents of a Directory
Thank you..!!

More Related Content

What's hot

Important Linux Commands
Important Linux CommandsImportant Linux Commands
Important Linux CommandsArun Sharma
 
Bba ii cam u i-operating system concept
Bba ii cam  u i-operating system conceptBba ii cam  u i-operating system concept
Bba ii cam u i-operating system conceptRai University
 
011300 Intro To Dos
011300 Intro To Dos011300 Intro To Dos
011300 Intro To DosCTIN
 
Unit II - MS DOS Commands
Unit II - MS DOS CommandsUnit II - MS DOS Commands
Unit II - MS DOS CommandsHepsijeba
 
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2Gourav Varma
 
Basic dos-commands
Basic dos-commandsBasic dos-commands
Basic dos-commandsparag dhok
 
DOS - Disk Operating System
DOS - Disk Operating SystemDOS - Disk Operating System
DOS - Disk Operating SystemMeqdad Darweesh
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overviewAmeer Sameer
 
Internal commands.29to30
Internal commands.29to30Internal commands.29to30
Internal commands.29to30myrajendra
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)raj upadhyay
 
Lesson 3 Working with Files in Linux
Lesson 3 Working with Files in LinuxLesson 3 Working with Files in Linux
Lesson 3 Working with Files in LinuxSadia Bashir
 

What's hot (20)

Important Linux Commands
Important Linux CommandsImportant Linux Commands
Important Linux Commands
 
Linux commands
Linux commands Linux commands
Linux commands
 
Bba ii cam u i-operating system concept
Bba ii cam  u i-operating system conceptBba ii cam  u i-operating system concept
Bba ii cam u i-operating system concept
 
MS Dos command
MS Dos commandMS Dos command
MS Dos command
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
011300 Intro To Dos
011300 Intro To Dos011300 Intro To Dos
011300 Intro To Dos
 
Ms DOS
Ms DOSMs DOS
Ms DOS
 
Unit II - MS DOS Commands
Unit II - MS DOS CommandsUnit II - MS DOS Commands
Unit II - MS DOS Commands
 
Linux course fhs file hierarchy standard
Linux   course   fhs file hierarchy standardLinux   course   fhs file hierarchy standard
Linux course fhs file hierarchy standard
 
DOS commands
DOS commandsDOS commands
DOS commands
 
Introduction to linux2
Introduction to linux2Introduction to linux2
Introduction to linux2
 
Basic dos-commands
Basic dos-commandsBasic dos-commands
Basic dos-commands
 
DOS - Disk Operating System
DOS - Disk Operating SystemDOS - Disk Operating System
DOS - Disk Operating System
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
 
Internal commands.29to30
Internal commands.29to30Internal commands.29to30
Internal commands.29to30
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 
Dos commands
Dos commandsDos commands
Dos commands
 
Lesson 3 Working with Files in Linux
Lesson 3 Working with Files in LinuxLesson 3 Working with Files in Linux
Lesson 3 Working with Files in Linux
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
MS-DOS
MS-DOSMS-DOS
MS-DOS
 

Similar to Directory Commands - R.D.Sivakumar

File Commands - R.D.Sivakumar
File Commands - R.D.SivakumarFile Commands - R.D.Sivakumar
File Commands - R.D.SivakumarSivakumar R D .
 
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
 
Command line in Windows.pptx
Command line in Windows.pptxCommand line in Windows.pptx
Command line in Windows.pptxssuser536c36
 
Unix primer
Unix primerUnix primer
Unix primerdummy
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdfamitkamble79
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line ToolsDavid Harris
 
Directory Management in Unix
 Directory Management in Unix Directory Management in Unix
Directory Management in UnixVpmv
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Ahmed El-Arabawy
 
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
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX CommandsSubra Das
 
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
 
Linux day 2.ppt
Linux day  2.pptLinux day  2.ppt
Linux day 2.pptKalkey
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.pptLuigysToro
 
Chapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptxChapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptxalehegn9
 
Lab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docx
Lab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docxLab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docx
Lab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docxjesseniasaddler
 
Shell Scripting crash course.pdf
Shell Scripting crash course.pdfShell Scripting crash course.pdf
Shell Scripting crash course.pdfharikrishnapolaki
 

Similar to Directory Commands - R.D.Sivakumar (20)

LinuxLabBasics.ppt
LinuxLabBasics.pptLinuxLabBasics.ppt
LinuxLabBasics.ppt
 
Linux
LinuxLinux
Linux
 
File Commands - R.D.Sivakumar
File Commands - R.D.SivakumarFile Commands - R.D.Sivakumar
File Commands - R.D.Sivakumar
 
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
 
Command line in Windows.pptx
Command line in Windows.pptxCommand line in Windows.pptx
Command line in Windows.pptx
 
Unix primer
Unix primerUnix primer
Unix primer
 
linux commands.pdf
linux commands.pdflinux commands.pdf
linux commands.pdf
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line Tools
 
Directory Management in Unix
 Directory Management in Unix Directory Management in Unix
Directory Management in Unix
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
 
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
 
basic-unix.pdf
basic-unix.pdfbasic-unix.pdf
basic-unix.pdf
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
 
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
 
Linux day 2.ppt
Linux day  2.pptLinux day  2.ppt
Linux day 2.ppt
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
 
Chapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptxChapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptx
 
Lab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docx
Lab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docxLab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docx
Lab #2-2 Using the Linux OS (Execution of Linux Commands)Due.docx
 
Shell Scripting crash course.pdf
Shell Scripting crash course.pdfShell Scripting crash course.pdf
Shell Scripting crash course.pdf
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 

More from Sivakumar R D .

Internet Connections and Its Protocols - R D Sivakumar
Internet Connections and Its Protocols - R D SivakumarInternet Connections and Its Protocols - R D Sivakumar
Internet Connections and Its Protocols - R D SivakumarSivakumar R D .
 
Internet - R D Sivakumar.
Internet - R D Sivakumar.Internet - R D Sivakumar.
Internet - R D Sivakumar.Sivakumar R D .
 
Data Communication - R D Sivakumar
Data Communication - R D SivakumarData Communication - R D Sivakumar
Data Communication - R D SivakumarSivakumar R D .
 
NETWORK SERVICES - R D Sivakumar
NETWORK SERVICES - R D SivakumarNETWORK SERVICES - R D Sivakumar
NETWORK SERVICES - R D SivakumarSivakumar R D .
 
Computer Communications - R D Sivakumar
Computer Communications - R D SivakumarComputer Communications - R D Sivakumar
Computer Communications - R D SivakumarSivakumar R D .
 
Online Data Protection - R D Sivakumar
Online Data Protection - R D SivakumarOnline Data Protection - R D Sivakumar
Online Data Protection - R D SivakumarSivakumar R D .
 
Software Engineering - R.D.Sivakumar
Software Engineering - R.D.SivakumarSoftware Engineering - R.D.Sivakumar
Software Engineering - R.D.SivakumarSivakumar R D .
 
Different Kinds of Internet Protocols - R.D.Sivakumar
Different Kinds of Internet Protocols - R.D.SivakumarDifferent Kinds of Internet Protocols - R.D.Sivakumar
Different Kinds of Internet Protocols - R.D.SivakumarSivakumar R D .
 
Internet - R.D.Sivakumar
Internet - R.D.SivakumarInternet - R.D.Sivakumar
Internet - R.D.SivakumarSivakumar R D .
 
Electronic Publishing Tools for E-Learning - R.D.Sivakumar
Electronic Publishing Tools for E-Learning - R.D.SivakumarElectronic Publishing Tools for E-Learning - R.D.Sivakumar
Electronic Publishing Tools for E-Learning - R.D.SivakumarSivakumar R D .
 
E-learning Packages - R.D.Sivakumar
E-learning Packages - R.D.SivakumarE-learning Packages - R.D.Sivakumar
E-learning Packages - R.D.SivakumarSivakumar R D .
 
Digital Communication - R.D.Sivakumar
Digital Communication - R.D.SivakumarDigital Communication - R.D.Sivakumar
Digital Communication - R.D.SivakumarSivakumar R D .
 
Digigogy in Teaching - R.D.Sivakumar
Digigogy in Teaching - R.D.SivakumarDigigogy in Teaching - R.D.Sivakumar
Digigogy in Teaching - R.D.SivakumarSivakumar R D .
 
Cyber Commerce Technology - R.D.Sivakumar
Cyber Commerce Technology - R.D.SivakumarCyber Commerce Technology - R.D.Sivakumar
Cyber Commerce Technology - R.D.SivakumarSivakumar R D .
 
Video Lesson Creation - R.D.Sivakumar
Video Lesson Creation - R.D.SivakumarVideo Lesson Creation - R.D.Sivakumar
Video Lesson Creation - R.D.SivakumarSivakumar R D .
 
Cognitive and Personal Dimensions of Cyber Learning - R.D.Sivakumar
Cognitive and Personal Dimensions of Cyber Learning - R.D.SivakumarCognitive and Personal Dimensions of Cyber Learning - R.D.Sivakumar
Cognitive and Personal Dimensions of Cyber Learning - R.D.SivakumarSivakumar R D .
 
Innovative Presentation - R.D.Sivakumar
Innovative Presentation - R.D.SivakumarInnovative Presentation - R.D.Sivakumar
Innovative Presentation - R.D.SivakumarSivakumar R D .
 
Open Source in E-Learning - R.D.Sivakumar
Open Source in E-Learning - R.D.SivakumarOpen Source in E-Learning - R.D.Sivakumar
Open Source in E-Learning - R.D.SivakumarSivakumar R D .
 
Tuxpaint - R.D.Sivakumar
Tuxpaint - R.D.SivakumarTuxpaint - R.D.Sivakumar
Tuxpaint - R.D.SivakumarSivakumar R D .
 
Academic Blog Design - R.D.Sivakumar
Academic Blog Design - R.D.SivakumarAcademic Blog Design - R.D.Sivakumar
Academic Blog Design - R.D.SivakumarSivakumar R D .
 

More from Sivakumar R D . (20)

Internet Connections and Its Protocols - R D Sivakumar
Internet Connections and Its Protocols - R D SivakumarInternet Connections and Its Protocols - R D Sivakumar
Internet Connections and Its Protocols - R D Sivakumar
 
Internet - R D Sivakumar.
Internet - R D Sivakumar.Internet - R D Sivakumar.
Internet - R D Sivakumar.
 
Data Communication - R D Sivakumar
Data Communication - R D SivakumarData Communication - R D Sivakumar
Data Communication - R D Sivakumar
 
NETWORK SERVICES - R D Sivakumar
NETWORK SERVICES - R D SivakumarNETWORK SERVICES - R D Sivakumar
NETWORK SERVICES - R D Sivakumar
 
Computer Communications - R D Sivakumar
Computer Communications - R D SivakumarComputer Communications - R D Sivakumar
Computer Communications - R D Sivakumar
 
Online Data Protection - R D Sivakumar
Online Data Protection - R D SivakumarOnline Data Protection - R D Sivakumar
Online Data Protection - R D Sivakumar
 
Software Engineering - R.D.Sivakumar
Software Engineering - R.D.SivakumarSoftware Engineering - R.D.Sivakumar
Software Engineering - R.D.Sivakumar
 
Different Kinds of Internet Protocols - R.D.Sivakumar
Different Kinds of Internet Protocols - R.D.SivakumarDifferent Kinds of Internet Protocols - R.D.Sivakumar
Different Kinds of Internet Protocols - R.D.Sivakumar
 
Internet - R.D.Sivakumar
Internet - R.D.SivakumarInternet - R.D.Sivakumar
Internet - R.D.Sivakumar
 
Electronic Publishing Tools for E-Learning - R.D.Sivakumar
Electronic Publishing Tools for E-Learning - R.D.SivakumarElectronic Publishing Tools for E-Learning - R.D.Sivakumar
Electronic Publishing Tools for E-Learning - R.D.Sivakumar
 
E-learning Packages - R.D.Sivakumar
E-learning Packages - R.D.SivakumarE-learning Packages - R.D.Sivakumar
E-learning Packages - R.D.Sivakumar
 
Digital Communication - R.D.Sivakumar
Digital Communication - R.D.SivakumarDigital Communication - R.D.Sivakumar
Digital Communication - R.D.Sivakumar
 
Digigogy in Teaching - R.D.Sivakumar
Digigogy in Teaching - R.D.SivakumarDigigogy in Teaching - R.D.Sivakumar
Digigogy in Teaching - R.D.Sivakumar
 
Cyber Commerce Technology - R.D.Sivakumar
Cyber Commerce Technology - R.D.SivakumarCyber Commerce Technology - R.D.Sivakumar
Cyber Commerce Technology - R.D.Sivakumar
 
Video Lesson Creation - R.D.Sivakumar
Video Lesson Creation - R.D.SivakumarVideo Lesson Creation - R.D.Sivakumar
Video Lesson Creation - R.D.Sivakumar
 
Cognitive and Personal Dimensions of Cyber Learning - R.D.Sivakumar
Cognitive and Personal Dimensions of Cyber Learning - R.D.SivakumarCognitive and Personal Dimensions of Cyber Learning - R.D.Sivakumar
Cognitive and Personal Dimensions of Cyber Learning - R.D.Sivakumar
 
Innovative Presentation - R.D.Sivakumar
Innovative Presentation - R.D.SivakumarInnovative Presentation - R.D.Sivakumar
Innovative Presentation - R.D.Sivakumar
 
Open Source in E-Learning - R.D.Sivakumar
Open Source in E-Learning - R.D.SivakumarOpen Source in E-Learning - R.D.Sivakumar
Open Source in E-Learning - R.D.Sivakumar
 
Tuxpaint - R.D.Sivakumar
Tuxpaint - R.D.SivakumarTuxpaint - R.D.Sivakumar
Tuxpaint - R.D.Sivakumar
 
Academic Blog Design - R.D.Sivakumar
Academic Blog Design - R.D.SivakumarAcademic Blog Design - R.D.Sivakumar
Academic Blog Design - R.D.Sivakumar
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Recently uploaded (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

Directory Commands - R.D.Sivakumar

  • 1. R.D.SIVAKUMAR, M.Sc.,M.Phil.,M.Tech., Assistant Professor of Computer Science & Assistant Professor and Head, Department of M.Com.(CA), Ayya Nadar Janaki Ammal College, Sivakasi – 626 124. Mobile: 099440-42243 e-mail : sivamsccsit@gmail.com website: www.rdsivakumar.blogspot.in Directory Commands
  • 2. Directory Commands The first thing that you are expected to know is some fundamental concepts of commands. The general format of a command is: Command option argument Not all commands need the “option” and “argument”. Some needs option alone some needs argument alone and while others need both. For example ls (abbreviation for list but do not try to help the system by typing list instead of ls. This helping action is greeted with an error message. The command ls saves you from typing two more characters, but it adds human memory load.) command works without option and argument, with argument alone, with option alone and with both. Argument usually refers the name of the file on which the command should work with. It should start with an alphabet. Some system files called dot files start with a . (dot).
  • 3. Directory Commands In the Fig. 3.1 even though there are two bins and two personal directories, they can be uniquely identified by the system because of the path name. The path names for the bin directories are /bin and / usr/bin. The first slash (/) always represents the root directory. As already stated, a slash before the first directory in the path, represents the root. Path name also applies to files. The file is created within a directory by specifying a name. The system identifies the file with filename combined with the path of the directories from the root to the file’s directory. Path names are of two types. They are 1. the Absolute path name and 2. the Relative path name. An absolute path name is the complete path name of a file or directory starting with root directory. A relative path name begins with your working directory. It is the path of the file relative to your working directory.
  • 4. Directory Commands Changing the Current Directory The cd (change directory) command changes the current directory to the specified directory. For example the current user ilamathi wants to switch over from her home directory to /usr/bin. She first finds out the current directory to ascertain her position and then she switches over to /usr/ bin. She executes the following commands at the command prompt. [ilamathi@localhost ilamathi] $ pwd /home/ilamathi [ilamathi@localhost ilamathi] $ cd /usr/bin [ilamathi@localhost bin ] $ pwd /usr/bin If she wants to move to parent directory of the current directory then she has to use cd .. at the $ prompt. cd command will not show the directory on the screen. To show the directory, pwd command should be given at the $ prompt. Note: The double dots (..) denote the path of parent directory. The single dot(.) represents the directory itself. There should be a blank space between cd and .. and there should be no blank space between the two dots
  • 5. Directory Commands Creating a Directory The user kumaran wants to create an insurance directory under his health directory. He is already in the health directory. He should make use of mkdir (make directory) command.  This command creates the directory specified after the mkdir command, under the current directory. But the newly created directory will not become the current directory automatically. If you want move to the newly created directory you have to make use of cd command. [kumaran@localhost health] $ mkdir insurance A new directory under health is created. You can specify the full path to make a directory with mkdir command
  • 6. Directory Commands Removing a Directory When there is a provision to make a directory, there should be a provision to remove a directory also. Can you guess the command? Yes, you are right! It is rmdir (remove directory). Example: [kumaran@localhost health] $ rmdir insurance If you want remove a directory, the directory 1) should be empty and 2) should not be the current directory. Kumaran did not store any thing in the insurance and the current directory is only health not insurance. So, it is possible to delete the insurance directory. If you want to remove a directory, which is not empty, you can make use of rm command, which will be discussed shortly. As in the case of mkdir command, you can use full path.
  • 7. Directory Commands Listing the Contents of a Directory Suppose you want to find out the name of the files and the subdirectories of a directory, ls is the only candidate to achieve this. For example the user Kumaran wants to know the names of the files and directories of /home/kumaran, he must give the following command. [kumaran@localhost kumaran] $ ls /home/kumaran healthcprogramming c++programming personal. [kumaran@localhost kumaran] $ ls - F health / cprogramming c++ programming personal / The option -F adds / at the end of the directories and sub-directories.
  • 8. Directory Commands Listing the Contents of a Directory