際際滷

際際滷Share a Scribd company logo
Simple commands in Linux:
1. Is  Displays information about files in the current directory.
Syntax of `ls` command in Linux
ls [option] [file/directory]
2. pwd  Displays the current working directory.
pwd [OPTIONS]
3. mkdir  Creates a directory.
Syntax:
mkdir [options...] [directories ...]
Options available in mkdir
1) help:
It displays help-related information and exits.
Syntax:
mkdir --help
2) version:
It displays the version number, some information regarding the license and exits.
Syntax:
mkdir version
3)-p:
A flag which enables the command to create parent directories as necessary. If the
directories exist, no error is specified.
Syntax:
mkdir -p [directories]
4) -m:
This option is used to set the file modes, i.e. permissions, etc. for the created
directories. The syntax of the mode is the same as the chmod command.
Syntax:
mkdir -m a=rwx [directories]
4. cd  To navigate between different folders.
Syntax:
cd [directory_name]
Here, replace [directory_name] with the desired directory you want to move in.
For Example:
If we want to move to a subdirectory name Documents
cd Documents
5. rmdir  Removes empty directories from the directory lists.
Syntax- rmdir <directory>
6. cp  Moves files from one directory to another.
Syntax:
cp [OPTION] Source Destination
cp [OPTION] Source Directory
cp [OPTION] Source-1 Source-2 Source-3 Source-n Directory
Example:
$ ls
a.txt
$ cp a.txt b.txt
$ ls
a.txt b.txt
7. mv  Rename and Replace the files
Syntax:
mv [options(s)] [source_file_name(s)] [Destination_file_name]
8. rm  Delete files
Syntax:
rm [OPTION]... FILE...
Ex:
Removing one file at a time
$ rm a.txt
$ ls
b.txt c.txt d.txt e.txt
Removing more than one file at a time
$ rm b.txt c.txt
$ ls
d.txt e.txt
9. touch  Create empty files
Syntax:
touch file_name
10. cat  Display file contents on terminal
Syntax:
cat file_name
11. echo- Echo is a command used for displaying lines of text or string which are
passed as arguments on the command line
Syntax:
echo [string]
Example:
echo "MCA Class 1st"
12. clear  Clear terminal
Syntax:
reset
Practicals
1.ls Command with different argument
ls is a Linux shell command that lists directory contents of files and directories.
It provides valuable information about files, directories, and their attributes.
Syntax of `ls` command in Linux
ls [option] [file/directory]
Commonly Used Options in `ls` command in Linux
Options Description
-l
known as a long format that displays detailed information about files and
directories.
-a Represent all files Include hidden files and directories in the listing.
-t
Sort files and directories by their last modification time, displaying the
most recently modified ones first.
-r
known as reverse order which is used to reverse the default order of
listing.
-S Sort files and directories by their sizes, listing the largest ones first.
-R List files and directories recursively, including subdirectories.
-i
known as inode which displays the index number (inode) of each file and
directory.
Options Description
-g
known as group which displays the group ownership of files and
directories instead of the owner.
-h Print file sizes in human-readable format (e.g., 1K, 234M, 2G).
-d List directories themselves, rather than their contents.
2. File contained in home directory
There are multiple ways to access and return to the home directory. Some commands are very
helpful for the directories such as cd, pwd, mkdir, pwd, ls, and rmdir.
Here, we can explore our home directory.
Generally, our terminal opens with the user's particular directory. To change directory to
home directory, execute the cd command as follows:
1.cd /home
The above command will change the directory to home. To list the home directory,
execute the ls command as follows:
ls
We can get back to our home directory by executing the cd command without any
argument. It will back to our home directory from any directory we are working on.
Execute it as follows:
cd
2. pwd
To display the current working directory, execute the pwd command as follows:
pwd
3. mkdir
To create a directory under a directory, execute the mkdir command as follows:
mkdir <directory name>
3. Move the file from one directory to another
The mv command moves files and directories from one directory to another, or renames
a file or directory. If you move a file or directory to a new directory, it retains the base file
name. When you move a file .
Syntax:
mv [options(s)] [source_file_name(s)] [Destination_file_name]
4. The command to sort the directory to listing by the size
To sort files by size, use the option -S with the ls command. Mind it, it's capital S for
sorting. That's good but you can make it better by adding the -h option. This option
makes the output of the ls command displays the file size in human readable formats.
The -S option of the ls command sorts the files by size.
5. To print the current working directory
Print Current DirectoryTo know your current directory, you can use
the pwd command which stands for Print Working Directory.
Syntax of `pwd` command in Linux
pwd [OPTIONS]
This command doesnt have any arguments or options, but it can accept flags for
specific behavior.
Flags For Specific behavior in `pwd` command in Linux.
 The -L flag resolves symbolic links and prints the path of the target directory.
 The default behavior of the shell built-in pwd is equivalent to using pwd -L.
 Mention the -P flag, which displays the actual path without resolving symbolic
links.
 The default behavior of the binary /bin/pwd is the same as using pwd -P

More Related Content

What's hot (20)

Zusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehtsZusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
panagenda
normalization-1nf-to-3nf-with-same-example.ppt
normalization-1nf-to-3nf-with-same-example.pptnormalization-1nf-to-3nf-with-same-example.ppt
normalization-1nf-to-3nf-with-same-example.ppt
AshishPatel366192
Ftp
FtpFtp
Ftp
Pablo
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai
Spanning Tree Protocol Cheat Sheet
Spanning Tree Protocol Cheat SheetSpanning Tree Protocol Cheat Sheet
Spanning Tree Protocol Cheat Sheet
Prasanna Shanmugasundaram
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
tmavroidis
PostgreSQL - Lecci坦n 4 - Usando funciones para manipular grupos de datosPostgreSQL - Lecci坦n 4 - Usando funciones para manipular grupos de datos
PostgreSQL - Lecci坦n 4 - Usando funciones para manipular grupos de datos
Nicola Strappazzon C.
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
shravan saini
Resumen comandos routerResumen comandos router
Resumen comandos router
jlvive
Ftp server
Ftp serverFtp server
Ftp server
pawnbeeta
Sql delete, truncate, drop statements
Sql delete, truncate, drop statementsSql delete, truncate, drop statements
Sql delete, truncate, drop statements
Vivek Singh
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
Knowledge Center Computer
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
Netgate
Fifth normal form
Fifth normal formFifth normal form
Fifth normal form
Athi Sethu
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
Roshni Singh
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
Srinimf-際際滷s
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
Kalai Selvi
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
koolkampus
Zusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehtsZusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
Zusammenfuhrung von HCL Nomad Web und Domino ohne SafeLinx - So gehts
panagenda
normalization-1nf-to-3nf-with-same-example.ppt
normalization-1nf-to-3nf-with-same-example.pptnormalization-1nf-to-3nf-with-same-example.ppt
normalization-1nf-to-3nf-with-same-example.ppt
AshishPatel366192
Ftp
FtpFtp
Ftp
Pablo
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
tmavroidis
PostgreSQL - Lecci坦n 4 - Usando funciones para manipular grupos de datosPostgreSQL - Lecci坦n 4 - Usando funciones para manipular grupos de datos
PostgreSQL - Lecci坦n 4 - Usando funciones para manipular grupos de datos
Nicola Strappazzon C.
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
Basic commands of linux
Basic commands of linuxBasic commands of linux
Basic commands of linux
shravan saini
Resumen comandos routerResumen comandos router
Resumen comandos router
jlvive
Ftp server
Ftp serverFtp server
Ftp server
pawnbeeta
Sql delete, truncate, drop statements
Sql delete, truncate, drop statementsSql delete, truncate, drop statements
Sql delete, truncate, drop statements
Vivek Singh
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
User Management and Privileges on pfSense 2.4 - pfSense Hangout January 2018
Netgate
Fifth normal form
Fifth normal formFifth normal form
Fifth normal form
Athi Sethu
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
Roshni Singh
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
Srinimf-際際滷s
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
Kalai Selvi
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
koolkampus

Similar to linux commands.pdf (20)

linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
linux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linuxlinux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linux
zakiaxmed534
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
bhatvijetha
basic-unix.pdf
basic-unix.pdfbasic-unix.pdf
basic-unix.pdf
OmprakashNath2
Linux ppt
Linux pptLinux ppt
Linux ppt
Sanmuga Nathan
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
hetaldobariya
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
PrashantTechment
UNIX.pptx
UNIX.pptxUNIX.pptx
UNIX.pptx
P S Rani
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
LinuxLabBasics.ppt
LinuxLabBasics.pptLinuxLabBasics.ppt
LinuxLabBasics.ppt
CharuJain396881
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
Shankar Mahure
Directories description
Directories descriptionDirectories description
Directories description
Dr.M.Karthika parthasarathy
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
Subra Das
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
BITS
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptxLab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Ciceer Ghimirey
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptxLab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Ciceer Ghimirey
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
MeesanRaza
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
linux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linuxlinux chapter 5.pptx lesson About introduction to linux
linux chapter 5.pptx lesson About introduction to linux
zakiaxmed534
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
bhatvijetha
Linux file system nevigation
Linux file system nevigationLinux file system nevigation
Linux file system nevigation
hetaldobariya
Linux file commands and shell scripts
Linux file commands and shell scriptsLinux file commands and shell scripts
Linux file commands and shell scripts
PrashantTechment
UNIX.pptx
UNIX.pptxUNIX.pptx
UNIX.pptx
P S Rani
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
southees
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
Tushar B Kute
Chapter 4 Linux Basic Commands
Chapter 4 Linux Basic CommandsChapter 4 Linux Basic Commands
Chapter 4 Linux Basic Commands
Shankar Mahure
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
Subra Das
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
BITS
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptxLab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Ciceer Ghimirey
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptxLab 3 -Linux Files, Directories and Basic Commands.pptx
Lab 3 -Linux Files, Directories and Basic Commands.pptx
Ciceer Ghimirey
linux-file-system01.ppt
linux-file-system01.pptlinux-file-system01.ppt
linux-file-system01.ppt
MeesanRaza
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
Dimas Prasetyo

Recently uploaded (20)

G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
pridedigital19
LabelJoy Crack With Full Version 2025 free Download
LabelJoy Crack With Full Version 2025 free DownloadLabelJoy Crack With Full Version 2025 free Download
LabelJoy Crack With Full Version 2025 free Download
wotosaf192
Layers of thedvfffffffffffdvfdv Earth.ppt
Layers of thedvfffffffffffdvfdv Earth.pptLayers of thedvfffffffffffdvfdv Earth.ppt
Layers of thedvfffffffffffdvfdv Earth.ppt
BilalAshfaqAhmed2
Vovsoft Health Break Reminder Free License Key 2025
Vovsoft Health Break Reminder Free License Key 2025Vovsoft Health Break Reminder Free License Key 2025
Vovsoft Health Break Reminder Free License Key 2025
baired1545
Finance Director based in Perthshire, Scotland
Finance Director based in Perthshire, ScotlandFinance Director based in Perthshire, Scotland
Finance Director based in Perthshire, Scotland
Doug Mackay
ict-10.pdf dghjhrytetg dghrhgwthvd dthhertgfwf dfgweggw
ict-10.pdf dghjhrytetg  dghrhgwthvd dthhertgfwf  dfgweggwict-10.pdf dghjhrytetg  dghrhgwthvd dthhertgfwf  dfgweggw
ict-10.pdf dghjhrytetg dghrhgwthvd dthhertgfwf dfgweggw
nimshankaushalya75
BEYOND BORDERS: the real impacts of studying abroad
BEYOND BORDERS: the real impacts of studying abroadBEYOND BORDERS: the real impacts of studying abroad
BEYOND BORDERS: the real impacts of studying abroad
AlexandraAguirre52
Introduction-to-Criminology-Bacolod.pptx
Introduction-to-Criminology-Bacolod.pptxIntroduction-to-Criminology-Bacolod.pptx
Introduction-to-Criminology-Bacolod.pptx
LyraOlarCuevas
father'sday adalah hari penting bagiku.pptx
father'sday adalah hari penting bagiku.pptxfather'sday adalah hari penting bagiku.pptx
father'sday adalah hari penting bagiku.pptx
fitrisuci2
Presentation uw wjsjjsjs kennw kekke kkejnen
Presentation uw wjsjjsjs kennw kekke kkejnenPresentation uw wjsjjsjs kennw kekke kkejnen
Presentation uw wjsjjsjs kennw kekke kkejnen
iterlab1
Chapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgv
Chapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgvChapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgv
Chapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgv
TemesgenErena
Health equity in rural Nigeria presentation.pptx
Health equity in rural Nigeria presentation.pptxHealth equity in rural Nigeria presentation.pptx
Health equity in rural Nigeria presentation.pptx
zainababdulazeez2
Cloud_security_v2_chpater_9_s_version.pdf
Cloud_security_v2_chpater_9_s_version.pdfCloud_security_v2_chpater_9_s_version.pdf
Cloud_security_v2_chpater_9_s_version.pdf
alkabarala01
Grammarly Crack With Activation Key Free
Grammarly Crack With Activation Key FreeGrammarly Crack With Activation Key Free
Grammarly Crack With Activation Key Free
antmandsfg
Tucker Wooley Resume 2025 (Storyboard Artist, Animator)
Tucker Wooley Resume 2025 (Storyboard Artist, Animator)Tucker Wooley Resume 2025 (Storyboard Artist, Animator)
Tucker Wooley Resume 2025 (Storyboard Artist, Animator)
TuckerWooley
PMPCertificationTrainingwqetwefbedsdfbwdbe
PMPCertificationTrainingwqetwefbedsdfbwdbePMPCertificationTrainingwqetwefbedsdfbwdbe
PMPCertificationTrainingwqetwefbedsdfbwdbe
ShashankMallepula1
gastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjj
gastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjjgastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjj
gastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjj
mannapriyam56
Smadav Pro 2025 v15.3 Crack With Activatioin Key
Smadav Pro 2025 v15.3 Crack With Activatioin KeySmadav Pro 2025 v15.3 Crack With Activatioin Key
Smadav Pro 2025 v15.3 Crack With Activatioin Key
panipari980
Excuse me.pdf direction penunjuk arahhhhh
Excuse me.pdf direction penunjuk arahhhhhExcuse me.pdf direction penunjuk arahhhhh
Excuse me.pdf direction penunjuk arahhhhh
DaryNasmiFauziah2
bell hooks all about love quotes from her book
bell hooks all about love quotes from her bookbell hooks all about love quotes from her book
bell hooks all about love quotes from her book
R. Sosa
G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
G.K 8th Class yearly.docx bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
pridedigital19
LabelJoy Crack With Full Version 2025 free Download
LabelJoy Crack With Full Version 2025 free DownloadLabelJoy Crack With Full Version 2025 free Download
LabelJoy Crack With Full Version 2025 free Download
wotosaf192
Layers of thedvfffffffffffdvfdv Earth.ppt
Layers of thedvfffffffffffdvfdv Earth.pptLayers of thedvfffffffffffdvfdv Earth.ppt
Layers of thedvfffffffffffdvfdv Earth.ppt
BilalAshfaqAhmed2
Vovsoft Health Break Reminder Free License Key 2025
Vovsoft Health Break Reminder Free License Key 2025Vovsoft Health Break Reminder Free License Key 2025
Vovsoft Health Break Reminder Free License Key 2025
baired1545
Finance Director based in Perthshire, Scotland
Finance Director based in Perthshire, ScotlandFinance Director based in Perthshire, Scotland
Finance Director based in Perthshire, Scotland
Doug Mackay
ict-10.pdf dghjhrytetg dghrhgwthvd dthhertgfwf dfgweggw
ict-10.pdf dghjhrytetg  dghrhgwthvd dthhertgfwf  dfgweggwict-10.pdf dghjhrytetg  dghrhgwthvd dthhertgfwf  dfgweggw
ict-10.pdf dghjhrytetg dghrhgwthvd dthhertgfwf dfgweggw
nimshankaushalya75
BEYOND BORDERS: the real impacts of studying abroad
BEYOND BORDERS: the real impacts of studying abroadBEYOND BORDERS: the real impacts of studying abroad
BEYOND BORDERS: the real impacts of studying abroad
AlexandraAguirre52
Introduction-to-Criminology-Bacolod.pptx
Introduction-to-Criminology-Bacolod.pptxIntroduction-to-Criminology-Bacolod.pptx
Introduction-to-Criminology-Bacolod.pptx
LyraOlarCuevas
father'sday adalah hari penting bagiku.pptx
father'sday adalah hari penting bagiku.pptxfather'sday adalah hari penting bagiku.pptx
father'sday adalah hari penting bagiku.pptx
fitrisuci2
Presentation uw wjsjjsjs kennw kekke kkejnen
Presentation uw wjsjjsjs kennw kekke kkejnenPresentation uw wjsjjsjs kennw kekke kkejnen
Presentation uw wjsjjsjs kennw kekke kkejnen
iterlab1
Chapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgv
Chapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgvChapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgv
Chapter 2 DD.pdfgggfddcvhhjhdssdfhjjjgxsdfgv
TemesgenErena
Health equity in rural Nigeria presentation.pptx
Health equity in rural Nigeria presentation.pptxHealth equity in rural Nigeria presentation.pptx
Health equity in rural Nigeria presentation.pptx
zainababdulazeez2
Cloud_security_v2_chpater_9_s_version.pdf
Cloud_security_v2_chpater_9_s_version.pdfCloud_security_v2_chpater_9_s_version.pdf
Cloud_security_v2_chpater_9_s_version.pdf
alkabarala01
Grammarly Crack With Activation Key Free
Grammarly Crack With Activation Key FreeGrammarly Crack With Activation Key Free
Grammarly Crack With Activation Key Free
antmandsfg
Tucker Wooley Resume 2025 (Storyboard Artist, Animator)
Tucker Wooley Resume 2025 (Storyboard Artist, Animator)Tucker Wooley Resume 2025 (Storyboard Artist, Animator)
Tucker Wooley Resume 2025 (Storyboard Artist, Animator)
TuckerWooley
PMPCertificationTrainingwqetwefbedsdfbwdbe
PMPCertificationTrainingwqetwefbedsdfbwdbePMPCertificationTrainingwqetwefbedsdfbwdbe
PMPCertificationTrainingwqetwefbedsdfbwdbe
ShashankMallepula1
gastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjj
gastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjjgastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjj
gastroentritis ppt.pptxvvvvvbhhhhhhjjjjjjjj
mannapriyam56
Smadav Pro 2025 v15.3 Crack With Activatioin Key
Smadav Pro 2025 v15.3 Crack With Activatioin KeySmadav Pro 2025 v15.3 Crack With Activatioin Key
Smadav Pro 2025 v15.3 Crack With Activatioin Key
panipari980
Excuse me.pdf direction penunjuk arahhhhh
Excuse me.pdf direction penunjuk arahhhhhExcuse me.pdf direction penunjuk arahhhhh
Excuse me.pdf direction penunjuk arahhhhh
DaryNasmiFauziah2
bell hooks all about love quotes from her book
bell hooks all about love quotes from her bookbell hooks all about love quotes from her book
bell hooks all about love quotes from her book
R. Sosa

linux commands.pdf

  • 1. Simple commands in Linux: 1. Is Displays information about files in the current directory. Syntax of `ls` command in Linux ls [option] [file/directory] 2. pwd Displays the current working directory. pwd [OPTIONS] 3. mkdir Creates a directory. Syntax: mkdir [options...] [directories ...] Options available in mkdir 1) help: It displays help-related information and exits. Syntax: mkdir --help 2) version: It displays the version number, some information regarding the license and exits. Syntax: mkdir version 3)-p: A flag which enables the command to create parent directories as necessary. If the directories exist, no error is specified. Syntax: mkdir -p [directories]
  • 2. 4) -m: This option is used to set the file modes, i.e. permissions, etc. for the created directories. The syntax of the mode is the same as the chmod command. Syntax: mkdir -m a=rwx [directories] 4. cd To navigate between different folders. Syntax: cd [directory_name] Here, replace [directory_name] with the desired directory you want to move in. For Example: If we want to move to a subdirectory name Documents cd Documents 5. rmdir Removes empty directories from the directory lists. Syntax- rmdir <directory> 6. cp Moves files from one directory to another. Syntax: cp [OPTION] Source Destination cp [OPTION] Source Directory cp [OPTION] Source-1 Source-2 Source-3 Source-n Directory Example: $ ls a.txt $ cp a.txt b.txt $ ls a.txt b.txt
  • 3. 7. mv Rename and Replace the files Syntax: mv [options(s)] [source_file_name(s)] [Destination_file_name] 8. rm Delete files Syntax: rm [OPTION]... FILE... Ex: Removing one file at a time $ rm a.txt $ ls b.txt c.txt d.txt e.txt Removing more than one file at a time $ rm b.txt c.txt $ ls d.txt e.txt 9. touch Create empty files Syntax: touch file_name 10. cat Display file contents on terminal Syntax: cat file_name 11. echo- Echo is a command used for displaying lines of text or string which are passed as arguments on the command line Syntax: echo [string] Example: echo "MCA Class 1st"
  • 4. 12. clear Clear terminal Syntax: reset Practicals 1.ls Command with different argument ls is a Linux shell command that lists directory contents of files and directories. It provides valuable information about files, directories, and their attributes. Syntax of `ls` command in Linux ls [option] [file/directory] Commonly Used Options in `ls` command in Linux Options Description -l known as a long format that displays detailed information about files and directories. -a Represent all files Include hidden files and directories in the listing. -t Sort files and directories by their last modification time, displaying the most recently modified ones first. -r known as reverse order which is used to reverse the default order of listing. -S Sort files and directories by their sizes, listing the largest ones first. -R List files and directories recursively, including subdirectories. -i known as inode which displays the index number (inode) of each file and directory.
  • 5. Options Description -g known as group which displays the group ownership of files and directories instead of the owner. -h Print file sizes in human-readable format (e.g., 1K, 234M, 2G). -d List directories themselves, rather than their contents. 2. File contained in home directory There are multiple ways to access and return to the home directory. Some commands are very helpful for the directories such as cd, pwd, mkdir, pwd, ls, and rmdir. Here, we can explore our home directory. Generally, our terminal opens with the user's particular directory. To change directory to home directory, execute the cd command as follows: 1.cd /home The above command will change the directory to home. To list the home directory, execute the ls command as follows: ls We can get back to our home directory by executing the cd command without any argument. It will back to our home directory from any directory we are working on. Execute it as follows: cd 2. pwd To display the current working directory, execute the pwd command as follows: pwd
  • 6. 3. mkdir To create a directory under a directory, execute the mkdir command as follows: mkdir <directory name> 3. Move the file from one directory to another The mv command moves files and directories from one directory to another, or renames a file or directory. If you move a file or directory to a new directory, it retains the base file name. When you move a file . Syntax: mv [options(s)] [source_file_name(s)] [Destination_file_name] 4. The command to sort the directory to listing by the size To sort files by size, use the option -S with the ls command. Mind it, it's capital S for sorting. That's good but you can make it better by adding the -h option. This option makes the output of the ls command displays the file size in human readable formats. The -S option of the ls command sorts the files by size. 5. To print the current working directory Print Current DirectoryTo know your current directory, you can use the pwd command which stands for Print Working Directory. Syntax of `pwd` command in Linux pwd [OPTIONS] This command doesnt have any arguments or options, but it can accept flags for specific behavior.
  • 7. Flags For Specific behavior in `pwd` command in Linux. The -L flag resolves symbolic links and prints the path of the target directory. The default behavior of the shell built-in pwd is equivalent to using pwd -L. Mention the -P flag, which displays the actual path without resolving symbolic links. The default behavior of the binary /bin/pwd is the same as using pwd -P