SlideShare a Scribd company logo
Working with Commands
 These are the essential command-line concepts and
commands for working with directories in
Ubuntu/Linux. Mastering these skills will allow you to
navigate, manage, and automate your file system
efficiently from the command line.
 The command prompt, often represented by $, is
where you enter commands.
 It typically displays the current working directory and
user information.
1
2
Creating and Deleting Directories:
•mkdir directory_name: Create a new
directory with the specified name.
•nano directory_name.txt: Create a new text
with the specified name.
•rmdir directory_name: Delete an empty
directory.
•rm -r directory_name: Delete a directory and
all its contents recursively.
Navigating Directories:
•cd directory_name: Change the current working
directory to the specified directory.
•cd ..: Move up one directory (to the parent
directory).
•cd ~: Move to the home directory.
•pwd: Print the current working directory.
3
Listing Directory Contents:
•ls: List files and directories in the current working
directory.
•ls -l: List in long format, showing permissions, owner,
group, size, and modification date.
•ls -a: List all files, including hidden files (starting with a
dot).
•ls -R: List files and directories recursively, showing the
contents of subdirectories.
•ls -t: Sort the listing by modification time, with the most
recent files first.
•ls -S: Sort the listing by file size, with the largest files
first.
4
Advanced Listing Options:
•ls -lR: List files and directories recursively in long format.
•ls -lrt: List files and directories sorted by modification
time, newest first.
•ls -lS: List files and directories sorted by size, largest first.
•ls -lh: List file sizes in human-readable format (KB, MB, GB).
•ls -ld */: List only subdirectories in the current directory.

More Related Content

PPT
LinuxLabBasics.ppt
PDF
linux commands.pdf
PPTX
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
PPT
Linux directory commands:more options on cd and ls command
PDF
Basics of UNIX Commands
PPTX
UNIX.pptx
PPTX
File handling and permisions.pptx
PPT
Linux file system nevigation
LinuxLabBasics.ppt
linux commands.pdf
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
Linux directory commands:more options on cd and ls command
Basics of UNIX Commands
UNIX.pptx
File handling and permisions.pptx
Linux file system nevigation

Similar to Command for lab practice for information technology (20)

PPTX
Linux commands
PPTX
BASICS OF LINUX OPERATING SYSTEM.pptx
PPTX
Linux - Directory commands
PPT
linux-file-system01.ppt
ODP
Introduction to LINUX
PPTX
2. UNIX OS System Architecture easy.pptx
PPTX
Working with Files _ Directories in Linux(21-25).pptx
PDF
Unit3 browsing the filesystem
PPTX
LINUX_admin_commands.pptx
PPTX
Linux Commands all presentation file .pptx
PPTX
UNIX_Commandspppppppppppppppppppp_Presentation.pptx
PPTX
Basic Linux Commands with syntax and functions
PPTX
Basic Linux Commands and implementation with Examples
PPT
Linux commands and file structure
PPT
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
PPTX
linux chapter 5.pptx lesson About introduction to linux
PPT
linux-lecture4.ppt
PPTX
Linux day 2.ppt
PPTX
Directory Management in Unix
Linux commands
BASICS OF LINUX OPERATING SYSTEM.pptx
Linux - Directory commands
linux-file-system01.ppt
Introduction to LINUX
2. UNIX OS System Architecture easy.pptx
Working with Files _ Directories in Linux(21-25).pptx
Unit3 browsing the filesystem
LINUX_admin_commands.pptx
Linux Commands all presentation file .pptx
UNIX_Commandspppppppppppppppppppp_Presentation.pptx
Basic Linux Commands with syntax and functions
Basic Linux Commands and implementation with Examples
Linux commands and file structure
linux-lecture4.pptuyhbjhbiibihbiuhbbihbi
linux chapter 5.pptx lesson About introduction to linux
linux-lecture4.ppt
Linux day 2.ppt
Directory Management in Unix
Ad

More from tarrebulehora (7)

PDF
DESIGN_AND_IMPLEMENTATION_OF_PATIENT_MAN.pdf
PPTX
Chapter 3 - Data Structure and Algorithms.pptx
PPTX
Data communication and Computer Network Material (1).pptx
PPTX
Introduction to information about Data Structure.pptx
PPTX
Introduction to the fundamental of accounting
PPTX
The fundamental concept of nature of knowledge
PPTX
concept of security and network administration
DESIGN_AND_IMPLEMENTATION_OF_PATIENT_MAN.pdf
Chapter 3 - Data Structure and Algorithms.pptx
Data communication and Computer Network Material (1).pptx
Introduction to information about Data Structure.pptx
Introduction to the fundamental of accounting
The fundamental concept of nature of knowledge
concept of security and network administration
Ad

Recently uploaded (20)

PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Institutional Correction lecture only . . .
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Classroom Observation Tools for Teachers
PPTX
GDM (1) (1).pptx small presentation for students
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
VCE English Exam - Section C Student Revision Booklet
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Types and Its function , kingdom of life
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Institutional Correction lecture only . . .
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
A systematic review of self-coping strategies used by university students to ...
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Classroom Observation Tools for Teachers
GDM (1) (1).pptx small presentation for students
O7-L3 Supply Chain Operations - ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
STATICS OF THE RIGID BODIES Hibbelers.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
VCE English Exam - Section C Student Revision Booklet

Command for lab practice for information technology

  • 1. Working with Commands  These are the essential command-line concepts and commands for working with directories in Ubuntu/Linux. Mastering these skills will allow you to navigate, manage, and automate your file system efficiently from the command line.  The command prompt, often represented by $, is where you enter commands.  It typically displays the current working directory and user information. 1
  • 2. 2 Creating and Deleting Directories: •mkdir directory_name: Create a new directory with the specified name. •nano directory_name.txt: Create a new text with the specified name. •rmdir directory_name: Delete an empty directory. •rm -r directory_name: Delete a directory and all its contents recursively. Navigating Directories: •cd directory_name: Change the current working directory to the specified directory. •cd ..: Move up one directory (to the parent directory). •cd ~: Move to the home directory. •pwd: Print the current working directory.
  • 3. 3 Listing Directory Contents: •ls: List files and directories in the current working directory. •ls -l: List in long format, showing permissions, owner, group, size, and modification date. •ls -a: List all files, including hidden files (starting with a dot). •ls -R: List files and directories recursively, showing the contents of subdirectories. •ls -t: Sort the listing by modification time, with the most recent files first. •ls -S: Sort the listing by file size, with the largest files first.
  • 4. 4 Advanced Listing Options: •ls -lR: List files and directories recursively in long format. •ls -lrt: List files and directories sorted by modification time, newest first. •ls -lS: List files and directories sorted by size, largest first. •ls -lh: List file sizes in human-readable format (KB, MB, GB). •ls -ld */: List only subdirectories in the current directory.