SlideShare a Scribd company logo
Searching the File System
1
www.lpu.in Lovely Professional University
• Use command- find
– It search for files in a directory hierarchy under Linux and
all other UNIX like operating systems.
– Examples:
• find . - name thisfile.txt. ...
• find /home -name *.jpg. Look for all . ...
Searching the File System contd..
2
www.lpu.in Lovely Professional University
Use command- grep
• grep is an acronym that stands for Global Regular Expression
Print.
The grep command searches through the file, looking for matches to
the pattern specified.
Grep is case-sensitive.
Example:
grep myname biodata
• Here biodata is file and myname is specific pattern for searching in
biodata file
Use of grep
3
www.lpu.in Lovely Professional University
Use of grep contd..
4
www.lpu.in Lovely Professional University
Kill command
5
www.lpu.in Lovely Professional University
– The killall is a Linux only command. It kills processes by names.
– Examples:
• killall {Process-Name-Here}
• killall -9 {Process-Name-Here}
• killall -15 {Process-Name-Here}
• kill the process using a PID (Process ID)
– # kill 3486
PID can be searched using pgrep command
Path Variable
6
www.lpu.in Lovely Professional University
• It displays or set a search path for executable files at the command line.
• Syntax PATH pathname [;pathname] [;pathname] [;pathname]... PATH
PATH ; Key pathname : drive letter and/or folder ; : the command 'PATH ;'
will clear the path PATH without parameters will display the current path.
• The %PATH% environment variable contains a list of folders.
• The PATH variable is an environment variable containing an ordered
list of paths that Linux will search for executables when running a
command.
– For example, if we want to print Hello, world! in Bash, the
command echo can be used rather than /bin/echo, so long as /bin is in
PATH:
Adding/Deleting a Path
7
www.lpu.in Lovely Professional University
• Using the export command, new path can be added.
8
www.lpu.in Lovely Professional University
• Activity
• Add to the path in Windows
Other Shell Commands:
9
www.lpu.in Lovely Professional University
• ls
• cat
• man
• cd
• touch
• cp
• mv
• rmdir
• mkdir
• rm
• chmod
• pwd
• ps
• kill
10
www.lpu.in Lovely Professional University
ls command
• The ls command is used to list files or directories in Linux and other Unix-
based operating systems.
• Use of ls command as below:
11
www.lpu.in Lovely Professional University
cat command
• Outputs the contents of a text file.
• You can use it to read brief files or to concatenate files together.
• To append file1 onto the end of file2, enter:
• cat file1 >> file2
• To view the contents of a file named myfile, enter:
• cat myfile
12
www.lpu.in Lovely Professional University
man command
• The man command is a built-in manual for using Linux commands.
• Displays the user manual of any command that we can run on the terminal.
It provides a detailed view of the command which includes NAME,
SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN
VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS.
• Basic Symbol
• option – the search result output.
• section number – the section in which to look for the man page.
• command name – the name of the command which man page you want to
see.
13
www.lpu.in Lovely Professional University
cd command
• It changes your current directory location.
• By default, your Unix login session begins in your home directory.
• To switch to a subdirectory (of the current directory) named myfiles, enter:
• cd myfiles
• To switch to a directory named /home/dvader/empire_docs, enter:
• cd /home/dvader/empire_docs
14
www.lpu.in Lovely Professional University
Touch
The touch command's
primary function is to
modify a timestamp.
15
www.lpu.in Lovely Professional University
cp
• This command copies a file, preserving the original and creating an
identical copy.
– cp -i oldfile newfile
mv
mv stands for move.
mv is used to move one or more files or directories from one place to
another in a file system like UNIX.
Use it as:
mv [Option] source destination
chmod
• This command changes the permission information associated with a
file.
16
www.lpu.in Lovely Professional University
Mkdir
• The mkdir command is used to create (or make) a directory.
• Example:
• # mkdir LPUCSE
rmdir
• The rmdir directory is used to remove directories, but only those that are
empty (i.e., contain no files or subdirectories). In order to delete a directory
with actual contents, you must use the rm -R command.
• Example
• To remove an empty directory:
• # rmdir /mike
17
www.lpu.in Lovely Professional University
Rm
Use the rm command to remove files you no longer need.
Example
Removing one file at a time
$ rm CSEA.txt
Pwd
Simply type pwd into your terminal, and the command will output the absolute
path of your print working directory.
The pwd command writes to standard output the full path name of your current
directory (from the root directory). All directories are separated by a /
(slash). The root directory is represented by the first /, and the last directory
named is your current directory.
The ps command, short for Process Status, is a command line utility that is
used to display or view information related to the processes running in a
Linux system.
18
www.lpu.in Lovely Professional University
ps
The ps command, short for Process Status, is a command line utility that is
used to display or view information related to the processes running in a
Linux system.
kill
kill command in Linux (located in /bin/kill), is a built-in command which is
used to terminate processes manually.

More Related Content

Similar to linux cmds.pptx

Linux commands
Linux commandsLinux commands
Linux commands
penetration Tester
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma
perweeng31
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
iman darabi
 
Linux
LinuxLinux
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
 
Linux commands
Linux commandsLinux commands
Linux commandsU.P Police
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
AdamFallon4
 
Introduction to the linux command line.pdf
Introduction to the linux command line.pdfIntroduction to the linux command line.pdf
Introduction to the linux command line.pdf
CesleySCruz
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
Linux basics
Linux basicsLinux basics
Linux basics
BhaskarNeeluru
 
Linux basic for CADD biologist
Linux basic for CADD biologistLinux basic for CADD biologist
Linux basic for CADD biologist
Ajay Murali
 
Directories description
Directories descriptionDirectories description
Directories description
Dr.M.Karthika parthasarathy
 
Examples -partII
Examples -partIIExamples -partII
Examples -partII
Kedar Bhandari
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy Sanders
Devanand Gehlot
 
Using linux in schools
Using linux in schools Using linux in schools
Using linux in schools
saeed7878
 
Using linux in schools
Using linux in schools Using linux in schools
Using linux in schools
shinigami-99
 

Similar to linux cmds.pptx (20)

Linux commands
Linux commandsLinux commands
Linux commands
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma18 LINUX OS.pptx Linux command is basic isma
18 LINUX OS.pptx Linux command is basic isma
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
Linux
LinuxLinux
Linux
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
 
Introduction to the linux command line.pdf
Introduction to the linux command line.pdfIntroduction to the linux command line.pdf
Introduction to the linux command line.pdf
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux basic for CADD biologist
Linux basic for CADD biologistLinux basic for CADD biologist
Linux basic for CADD biologist
 
Directories description
Directories descriptionDirectories description
Directories description
 
Unix Basics For Testers
Unix Basics For TestersUnix Basics For Testers
Unix Basics For Testers
 
Linux
LinuxLinux
Linux
 
Examples -partII
Examples -partIIExamples -partII
Examples -partII
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy Sanders
 
Using linux in schools
Using linux in schools Using linux in schools
Using linux in schools
 
Using linux in schools
Using linux in schools Using linux in schools
Using linux in schools
 

Recently uploaded

Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
AkolbilaEmmanuel1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 

Recently uploaded (20)

Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 

linux cmds.pptx

  • 1. Searching the File System 1 www.lpu.in Lovely Professional University • Use command- find – It search for files in a directory hierarchy under Linux and all other UNIX like operating systems. – Examples: • find . - name thisfile.txt. ... • find /home -name *.jpg. Look for all . ...
  • 2. Searching the File System contd.. 2 www.lpu.in Lovely Professional University Use command- grep • grep is an acronym that stands for Global Regular Expression Print. The grep command searches through the file, looking for matches to the pattern specified. Grep is case-sensitive. Example: grep myname biodata • Here biodata is file and myname is specific pattern for searching in biodata file
  • 3. Use of grep 3 www.lpu.in Lovely Professional University
  • 4. Use of grep contd.. 4 www.lpu.in Lovely Professional University
  • 5. Kill command 5 www.lpu.in Lovely Professional University – The killall is a Linux only command. It kills processes by names. – Examples: • killall {Process-Name-Here} • killall -9 {Process-Name-Here} • killall -15 {Process-Name-Here} • kill the process using a PID (Process ID) – # kill 3486 PID can be searched using pgrep command
  • 6. Path Variable 6 www.lpu.in Lovely Professional University • It displays or set a search path for executable files at the command line. • Syntax PATH pathname [;pathname] [;pathname] [;pathname]... PATH PATH ; Key pathname : drive letter and/or folder ; : the command 'PATH ;' will clear the path PATH without parameters will display the current path. • The %PATH% environment variable contains a list of folders. • The PATH variable is an environment variable containing an ordered list of paths that Linux will search for executables when running a command. – For example, if we want to print Hello, world! in Bash, the command echo can be used rather than /bin/echo, so long as /bin is in PATH:
  • 7. Adding/Deleting a Path 7 www.lpu.in Lovely Professional University • Using the export command, new path can be added.
  • 8. 8 www.lpu.in Lovely Professional University • Activity • Add to the path in Windows
  • 9. Other Shell Commands: 9 www.lpu.in Lovely Professional University • ls • cat • man • cd • touch • cp • mv • rmdir • mkdir • rm • chmod • pwd • ps • kill
  • 10. 10 www.lpu.in Lovely Professional University ls command • The ls command is used to list files or directories in Linux and other Unix- based operating systems. • Use of ls command as below:
  • 11. 11 www.lpu.in Lovely Professional University cat command • Outputs the contents of a text file. • You can use it to read brief files or to concatenate files together. • To append file1 onto the end of file2, enter: • cat file1 >> file2 • To view the contents of a file named myfile, enter: • cat myfile
  • 12. 12 www.lpu.in Lovely Professional University man command • The man command is a built-in manual for using Linux commands. • Displays the user manual of any command that we can run on the terminal. It provides a detailed view of the command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS. • Basic Symbol • option – the search result output. • section number – the section in which to look for the man page. • command name – the name of the command which man page you want to see.
  • 13. 13 www.lpu.in Lovely Professional University cd command • It changes your current directory location. • By default, your Unix login session begins in your home directory. • To switch to a subdirectory (of the current directory) named myfiles, enter: • cd myfiles • To switch to a directory named /home/dvader/empire_docs, enter: • cd /home/dvader/empire_docs
  • 14. 14 www.lpu.in Lovely Professional University Touch The touch command's primary function is to modify a timestamp.
  • 15. 15 www.lpu.in Lovely Professional University cp • This command copies a file, preserving the original and creating an identical copy. – cp -i oldfile newfile mv mv stands for move. mv is used to move one or more files or directories from one place to another in a file system like UNIX. Use it as: mv [Option] source destination chmod • This command changes the permission information associated with a file.
  • 16. 16 www.lpu.in Lovely Professional University Mkdir • The mkdir command is used to create (or make) a directory. • Example: • # mkdir LPUCSE rmdir • The rmdir directory is used to remove directories, but only those that are empty (i.e., contain no files or subdirectories). In order to delete a directory with actual contents, you must use the rm -R command. • Example • To remove an empty directory: • # rmdir /mike
  • 17. 17 www.lpu.in Lovely Professional University Rm Use the rm command to remove files you no longer need. Example Removing one file at a time $ rm CSEA.txt Pwd Simply type pwd into your terminal, and the command will output the absolute path of your print working directory. The pwd command writes to standard output the full path name of your current directory (from the root directory). All directories are separated by a / (slash). The root directory is represented by the first /, and the last directory named is your current directory. The ps command, short for Process Status, is a command line utility that is used to display or view information related to the processes running in a Linux system.
  • 18. 18 www.lpu.in Lovely Professional University ps The ps command, short for Process Status, is a command line utility that is used to display or view information related to the processes running in a Linux system. kill kill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually.