際際滷

際際滷Share a Scribd company logo
PSG COLLEGE OF TECHNOLOGY
20MX15 - UNIX ARCHITECTURE AND PROGRAMMING
By
21MX124 - Sandhiya M.
21MX207 - Karpaga Prasanth K.
21MX210 - Maheash Kumar M.
21MX213 - Om Raju V.
Ms. A. Kalyani
Asst.Professor MCA (PSG)
The cd Command
The cd Command is used to change the current
directory to another directory.
Syntax: cd [directory path]
The bc Command
 bc command is used for command line calculator. It is similar to basic calculator
by using which we can do basic mathematical calculations.
Arithmetic operations are the most basic in any kind of programming language.
Linux or Unix operating system provides the bc command and expr
command for doing arithmetic calculations. You can use these commands in bash
or shell script also for evaluating arithmetic expressions.
Syntax:
Bs [-hlwsqv] [more options] [file]
bc - Supports
 Arithmetic operators.
 Increment or Decrement operators.
 Assignment operators.
 Comparison or Relational operators.
 Logical or Boolean operators.
 Math functions.
 Conditional statements.
 Iterative statements.
The man Command
 Man command in Linux is used to display the user manual of any command that we
can run on the terminal. provides a detailed view of the command which
includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS,
RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES,
AUTHORS and SEE ALSO.
Syntax:
$man [options] [command name]
Group13
The who Command
 The Linux "who" command lets you display
the users currently logged in to your UNIX or
Linux operating system. Whenever a user
needs to know about how many users are using
or are logged-in into a particular Linux-based
operating system, he/she can use the "who"
command to get that information.
The whoami
Command
 It displays the username of the current user
when this command is invoked.
 Displays user, group and privileges
information for the user who is currently
logged on to the local system. If used without
parameters, whoami displays the current domain
and user name.
The pwd Command
 pwd stands for Print Working Directory. It prints the path of the working directory,
starting from the root. pwd is shell built-in command(pwd).
 Options:
pwd -l : Prints the symbolic path.
pwd p : Prints the Actual path.
The mkdir Command
 Mkdir stands for make directory .
 The mkdir command is used to create a directory.
 -p: option create a hierarchy of directories.
Syntax: mkdir [directory path]
ubuntu@ubuntu-VirtualBox:~$ mkdir folder
ubuntu@ubuntu-VirtualBox:~$ mkdir folder1
ubuntu@ubuntu-VirtualBox:~$ mkdir -p folder1/subfolder/anotherfolder
The rmdir
Command
Rmdir stands for remove directory.
The rmdir command is used to remove
directory.
 Syntax: rmdir [directory path]
 ubuntu@ubuntu-VirtualBox:~$ rmdir folder
The ls
Command
The Linux ls command allows you to view a
list of the files and folders in a given
directory. You can also use this command to
display details of a file, such as the owner of
the file and the permissions assigned to the
file.
 ubuntu@ubuntu-VirtualBox:~$ ls
 21mx124_practice_commands Documents Music
samplefile Videos
 21mx124_practice_commands_2 Downloads Pictures
samplefile1
 Desktop folder1 Public Templates
THE LS
COMMAND
OPTIONS
Group13
Group13
Group13
Group13
Group13
Group13
The Touch
Command
The touch command is a standard command used in
UNIX/Linux operating system which is used to create,
change and modify timestamps of a file.
 Syntax: Touch [File_name]
 ubuntu@ubuntu-VirtualBox:~$ touch samplefile
 ubuntu@ubuntu-VirtualBox:~$ touch samplefile1
 ubuntu@ubuntu-VirtualBox:~$ ls
 21mx124_practice_commands Documents Music samplefile
Videos
 21mx124_practice_commands_2 Downloads Pictures
samplefile1
 Desktop folder1 Public Templates
The mv Command
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. It has two
distinct functions.
 It renames a file or folder.
 It moves a group of files to a different
directory.
The date Command
 Date command is used to display the system date and time. It is also used
to set date and time of the system.
 By default the date command displays the date in the time zone on which
unix operating system is configured.
 You must be the super-user to change the date and time.
Syntax:
$date
The cat Command
Cat command stands for concatenate. It reads data from the file and gives their
content as output. It helps us to create, view, and concatenate files.
Frequently used cat commands:
 To view a single file .
Command:
$cat filename
 To view multiple files
Command:
$cat file1 file2
 Create a file
Command:
$ cat >newfile
 Copy the contents of one file to another file.
Command:
$cat [filename-whose-contents-is-to-be-copied] > [destination-filename]
The More Command
 more command is used to view the text files in the command prompt, displaying
one screen at a time in case the file is large.
 The more command also allows the user do scroll up and down through the page.
 When the output is large, we can use more command to see output one by one.
 Another application of more is to use it with some other command after a pipe.
Syntax:
The syntax along with options and command is as follows.
more [-options] [-num] [+/pattern] [+linenum] [file_name]
[-options]: any option that you want to use in order to change the way the file is
displayed.
(-d, -l, -f, -p, -c, -s, -u)
[-num]: type the number of lines that you want to display.
[+/pattern]: replace the pattern with any string that you want to find in the text file.
[+linenum]: use the line number from where you want to start displaying the text
content.
[file_name]: name of the file containing the text that you want to display on the
screen.
The less Command
 Less command is used to read the contents of a file one page at a time.
 It has faster access because if file is large it doesnt access the complete file, but
accesses it page by page.
 For example, if its a large file and you are reading it using any text editor, then
the complete file will be loaded to main memory. The less command doesnt load
the entire file, but loads it part by part which makes it faster.
Syntax :
less filename
The print Command
 printf command is used to display the given string, number or any other format specifier on the
terminal.
 It works the same way as printf works in programming languages like C.
Syntax:
$printf [-v var] format [arguments]
The most commonly used printf specifiers are %s, %b, %d, %x and %f.
1) %s : It is basically a string specifier for string output. $printf "%sn" "Hello, World!"
2) %b : It is same as string specifier but it allows us to interpret escape sequences with an argument.
printf "%sn" "Hello, World! n" "From Geeks For Geeksn"
3) %d specifier: It is an integer specifier for showing the integral values.
Group13
The echo Command
 echo command in linux is used to display line of text/string that are passed as an
argument . This is a built in command that is mostly used in shell scripts and
batch files to output status text to the screen or a file.
Syntax:
Echo [option] [string]
The lp Command
 The lp command in Linux stands for 'Line printer' which lets you print the files
through the terminal. There is no need to change or manage the settings through
the GUI. You can simply manage the printers using lp command. This command
is also known as the printer management command Linux.
 This command is also known as the printer management command Linux. The lp
command in Linux is one of the CUPS i.e. Common Unix Printing System.
Syntax:
lp [filename]
Options of lp command
 d: to print the file using a particular printer.
 -n: print multiple copies of the document.
 -q: Set the priority of the printer in the printer queue.
 -t: to assign a name to the job.
 -o: assigns one or more job.
 -i: specifies an existing job to modify.
 -m: notifies the recipient when the job is completed.
 -h: denotes the hostname of the server.
 -E: forces the encryption while connecting to the server.
The rmCommand
 The 'rm' means remove. This command is used to remove a file. The command
line doesn't have a recycle bin or trash unlike other GUI's to recover the files.
Hence, be very much careful while using this command. Once you have deleted a
file, it is removed permanently.
 Syntax:
rm <filename>
 Example:
rm myfile1
Options in rm
 rm *extension - Used to delete files having same extension.
 rm -r or R - To delete a directory recursively.
 rm i - Remove a file interactively.
 rm rf - Remove a directory forcefully.
The cp
Command
 cp stands for copy. This
command is used to copy files or
group of files or directory. It
creates an exact image of a file on
a disk with different file
name. cp command require at
least two filenames in its
arguments.
Syntax: cp [Source file]
[destination file]
cp R : If the command contains two directory names, cp copies all files of the source
directory to the destination directory, creating any files or directories needed. This mode of
operation requires an additional option, typically R, to indicate the recursive copying of
directories.
 Syntax: cp -R [Src_dir] [des_dir]
cp -i : i stands for Interactive copying. With this option system first warns the user before
overwriting the destination file. cp prompts for a response, if you press y then it overwrites
the file and with any other option leave it uncopied.
 Synatx: cp I [Src_file] [des_file]

More Related Content

What's hot (12)

PPTX
Linux commands part -2
bhatvijetha
PPT
Linux Commands
sundas Shabbir
PDF
Basic linux commands
Raghav Arora
PPTX
Compression
aswathyu
PDF
Linux basic commands with examples
abclearnn
PPT
Linux commands
bhatvijetha
PPT
Basic command ppt
Rohit Kumar
PDF
Course 102: Lecture 17: Process Monitoring
Ahmed El-Arabawy
PPT
Linux day 1
sumairdotcom
PPT
Basic Linux day 2
Saikumar Daram
PPTX
Linux
Srinivas Reddy
PDF
Basic commands
ambilivava
Linux commands part -2
bhatvijetha
Linux Commands
sundas Shabbir
Basic linux commands
Raghav Arora
Compression
aswathyu
Linux basic commands with examples
abclearnn
Linux commands
bhatvijetha
Basic command ppt
Rohit Kumar
Course 102: Lecture 17: Process Monitoring
Ahmed El-Arabawy
Linux day 1
sumairdotcom
Basic Linux day 2
Saikumar Daram
Basic commands
ambilivava

Similar to Group13 (20)

PPTX
various shell commands in unix operating system.pptx
ssuserc26f8f
PDF
LinuxCommands (1).pdf
AnkitKushwaha792697
PPTX
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
ODP
Babitha.linux
banubabitha
ODP
Babitha.linux
banubabitha
ODP
Babitha.linux
banubabitha
ODP
Babitha.linux
banubabitha
ODP
Babitha.linux
banubabitha
ODP
Babitha.linux
banubabitha
ODP
Babitha.linux
banubabitha
PPT
Linux presentation
Nikhil Jain
PPTX
Unix Shell Script - 2 Days Session.pptx
Rajesh Kumar
ODP
Prabu linux
Prabu Cse
PDF
basic-unix.pdf
OmprakashNath2
PPTX
AARAV NAYAN OPERATING SYSTEM LABORATORY PCA
AaravNayan
PPTX
linuxcommands-140828081047-phpapp01.pptx
HarshaVardhanbale1
PDF
UNIX Command Cheat Sheets
Prashanth Kumar
PPTX
Linux Command.pptx
SaileshB5
PPTX
linux command1234_LINUX COMMANDS _1.pptx
ubalearchana6
PPTX
Basic Linux Administration - 3.pptxon server
RekeshPatel
various shell commands in unix operating system.pptx
ssuserc26f8f
LinuxCommands (1).pdf
AnkitKushwaha792697
2. UNIX OS System Architecture easy.pptx
Priyadarshini648418
Babitha.linux
banubabitha
Babitha.linux
banubabitha
Babitha.linux
banubabitha
Babitha.linux
banubabitha
Babitha.linux
banubabitha
Babitha.linux
banubabitha
Babitha.linux
banubabitha
Linux presentation
Nikhil Jain
Unix Shell Script - 2 Days Session.pptx
Rajesh Kumar
Prabu linux
Prabu Cse
basic-unix.pdf
OmprakashNath2
AARAV NAYAN OPERATING SYSTEM LABORATORY PCA
AaravNayan
linuxcommands-140828081047-phpapp01.pptx
HarshaVardhanbale1
UNIX Command Cheat Sheets
Prashanth Kumar
Linux Command.pptx
SaileshB5
linux command1234_LINUX COMMANDS _1.pptx
ubalearchana6
Basic Linux Administration - 3.pptxon server
RekeshPatel
Ad

Recently uploaded (20)

PPTX
To Live Is For Christ 06 29 2025.pptx
FamilyWorshipCenterD
PPTX
Ludwig van Beethoven Life and Legacy.pptx
aryansnow1304
PPTX
Pastor Bob Stewart Acts 19 06 25 2025.pptx
FamilyWorshipCenterD
DOC
STABILITY INDICATING METHOD DEVELOPMENT AND VALIDATION FOR SIMULTANEOUS ESTIM...
jmkeans624
PPTX
Soft Skills Training for Everybody.pp.pptx
Mayuri Srivastava
DOCX
Dissertation_Antony_Musyoka.docx.for presentation
antonykamile
PDF
models-of-communication reading and writing.pdf
TristanNabong
PPTX
Pr辿sentation Bruit Sud-Ouest- juin 2025_TG_EN_Final.pptx
Pont Samuel-De Champlain Bridge
PPTX
organic farm Dr Shashi Jain 19.06.2018.pptx
Pratibha Chauhan
PPTX
From Hackathon to Real-World Impact: The Story of Sneh Vidhya Sahayog
shubhamsharma994585
PDF
Performancesonore_verdun_EN.pdf
Pont Samuel-De Champlain Bridge
PDF
Performancesonore_sudouest_EN.pdf
Pont Samuel-De Champlain Bridge
PDF
SZWDL denim washing and dry washing industry
te20046
PPTX
2025-06-29 Abraham 05 (shared slides).pptx
Dale Wells
PPTX
Cynthia Kayle Share 5 Root Causes of Child Trafficking Around the World.pptx
Cynthia Kayle
PPTX
Accessibility isn't just for users. Creating engaging technical presentations...
Elizabeth McCready
PDF
Rethinking PublicPrivate Partnerships: From Funding Gaps to Shared Goals
Francois Stepman
PDF
Amazon Wholesale Product Research Example
Joseph Juntilla
PPTX
Pr辿sentation Bruit Verdun - juin 2025_TG_EN_Final.pptx
Pont Samuel-De Champlain Bridge
PPTX
AI for Empowering Women in AI
Letizia Jaccheri
To Live Is For Christ 06 29 2025.pptx
FamilyWorshipCenterD
Ludwig van Beethoven Life and Legacy.pptx
aryansnow1304
Pastor Bob Stewart Acts 19 06 25 2025.pptx
FamilyWorshipCenterD
STABILITY INDICATING METHOD DEVELOPMENT AND VALIDATION FOR SIMULTANEOUS ESTIM...
jmkeans624
Soft Skills Training for Everybody.pp.pptx
Mayuri Srivastava
Dissertation_Antony_Musyoka.docx.for presentation
antonykamile
models-of-communication reading and writing.pdf
TristanNabong
Pr辿sentation Bruit Sud-Ouest- juin 2025_TG_EN_Final.pptx
Pont Samuel-De Champlain Bridge
organic farm Dr Shashi Jain 19.06.2018.pptx
Pratibha Chauhan
From Hackathon to Real-World Impact: The Story of Sneh Vidhya Sahayog
shubhamsharma994585
Performancesonore_verdun_EN.pdf
Pont Samuel-De Champlain Bridge
Performancesonore_sudouest_EN.pdf
Pont Samuel-De Champlain Bridge
SZWDL denim washing and dry washing industry
te20046
2025-06-29 Abraham 05 (shared slides).pptx
Dale Wells
Cynthia Kayle Share 5 Root Causes of Child Trafficking Around the World.pptx
Cynthia Kayle
Accessibility isn't just for users. Creating engaging technical presentations...
Elizabeth McCready
Rethinking PublicPrivate Partnerships: From Funding Gaps to Shared Goals
Francois Stepman
Amazon Wholesale Product Research Example
Joseph Juntilla
Pr辿sentation Bruit Verdun - juin 2025_TG_EN_Final.pptx
Pont Samuel-De Champlain Bridge
AI for Empowering Women in AI
Letizia Jaccheri
Ad

Group13

  • 1. PSG COLLEGE OF TECHNOLOGY 20MX15 - UNIX ARCHITECTURE AND PROGRAMMING By 21MX124 - Sandhiya M. 21MX207 - Karpaga Prasanth K. 21MX210 - Maheash Kumar M. 21MX213 - Om Raju V. Ms. A. Kalyani Asst.Professor MCA (PSG)
  • 2. The cd Command The cd Command is used to change the current directory to another directory. Syntax: cd [directory path]
  • 3. The bc Command bc command is used for command line calculator. It is similar to basic calculator by using which we can do basic mathematical calculations. Arithmetic operations are the most basic in any kind of programming language. Linux or Unix operating system provides the bc command and expr command for doing arithmetic calculations. You can use these commands in bash or shell script also for evaluating arithmetic expressions. Syntax: Bs [-hlwsqv] [more options] [file]
  • 4. bc - Supports Arithmetic operators. Increment or Decrement operators. Assignment operators. Comparison or Relational operators. Logical or Boolean operators. Math functions. Conditional statements. Iterative statements.
  • 5. The man Command Man command in Linux is used to display the user manual of any command that we can run on the terminal. provides a detailed view of the command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS and SEE ALSO. Syntax: $man [options] [command name]
  • 7. The who Command The Linux "who" command lets you display the users currently logged in to your UNIX or Linux operating system. Whenever a user needs to know about how many users are using or are logged-in into a particular Linux-based operating system, he/she can use the "who" command to get that information.
  • 8. The whoami Command It displays the username of the current user when this command is invoked. Displays user, group and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name.
  • 9. The pwd Command pwd stands for Print Working Directory. It prints the path of the working directory, starting from the root. pwd is shell built-in command(pwd). Options: pwd -l : Prints the symbolic path. pwd p : Prints the Actual path.
  • 10. The mkdir Command Mkdir stands for make directory . The mkdir command is used to create a directory. -p: option create a hierarchy of directories. Syntax: mkdir [directory path] ubuntu@ubuntu-VirtualBox:~$ mkdir folder ubuntu@ubuntu-VirtualBox:~$ mkdir folder1 ubuntu@ubuntu-VirtualBox:~$ mkdir -p folder1/subfolder/anotherfolder
  • 11. The rmdir Command Rmdir stands for remove directory. The rmdir command is used to remove directory. Syntax: rmdir [directory path] ubuntu@ubuntu-VirtualBox:~$ rmdir folder
  • 12. The ls Command The Linux ls command allows you to view a list of the files and folders in a given directory. You can also use this command to display details of a file, such as the owner of the file and the permissions assigned to the file. ubuntu@ubuntu-VirtualBox:~$ ls 21mx124_practice_commands Documents Music samplefile Videos 21mx124_practice_commands_2 Downloads Pictures samplefile1 Desktop folder1 Public Templates
  • 20. The Touch Command The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a file. Syntax: Touch [File_name] ubuntu@ubuntu-VirtualBox:~$ touch samplefile ubuntu@ubuntu-VirtualBox:~$ touch samplefile1 ubuntu@ubuntu-VirtualBox:~$ ls 21mx124_practice_commands Documents Music samplefile Videos 21mx124_practice_commands_2 Downloads Pictures samplefile1 Desktop folder1 Public Templates
  • 21. The mv Command 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. It has two distinct functions. It renames a file or folder. It moves a group of files to a different directory.
  • 22. The date Command Date command is used to display the system date and time. It is also used to set date and time of the system. By default the date command displays the date in the time zone on which unix operating system is configured. You must be the super-user to change the date and time. Syntax: $date
  • 23. The cat Command Cat command stands for concatenate. It reads data from the file and gives their content as output. It helps us to create, view, and concatenate files. Frequently used cat commands: To view a single file . Command: $cat filename To view multiple files Command: $cat file1 file2
  • 24. Create a file Command: $ cat >newfile Copy the contents of one file to another file. Command: $cat [filename-whose-contents-is-to-be-copied] > [destination-filename]
  • 25. The More Command more command is used to view the text files in the command prompt, displaying one screen at a time in case the file is large. The more command also allows the user do scroll up and down through the page. When the output is large, we can use more command to see output one by one. Another application of more is to use it with some other command after a pipe.
  • 26. Syntax: The syntax along with options and command is as follows. more [-options] [-num] [+/pattern] [+linenum] [file_name] [-options]: any option that you want to use in order to change the way the file is displayed. (-d, -l, -f, -p, -c, -s, -u) [-num]: type the number of lines that you want to display. [+/pattern]: replace the pattern with any string that you want to find in the text file. [+linenum]: use the line number from where you want to start displaying the text content. [file_name]: name of the file containing the text that you want to display on the screen.
  • 27. The less Command Less command is used to read the contents of a file one page at a time. It has faster access because if file is large it doesnt access the complete file, but accesses it page by page. For example, if its a large file and you are reading it using any text editor, then the complete file will be loaded to main memory. The less command doesnt load the entire file, but loads it part by part which makes it faster. Syntax : less filename
  • 28. The print Command printf command is used to display the given string, number or any other format specifier on the terminal. It works the same way as printf works in programming languages like C. Syntax: $printf [-v var] format [arguments] The most commonly used printf specifiers are %s, %b, %d, %x and %f. 1) %s : It is basically a string specifier for string output. $printf "%sn" "Hello, World!" 2) %b : It is same as string specifier but it allows us to interpret escape sequences with an argument. printf "%sn" "Hello, World! n" "From Geeks For Geeksn" 3) %d specifier: It is an integer specifier for showing the integral values.
  • 30. The echo Command echo command in linux is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file. Syntax: Echo [option] [string]
  • 31. The lp Command The lp command in Linux stands for 'Line printer' which lets you print the files through the terminal. There is no need to change or manage the settings through the GUI. You can simply manage the printers using lp command. This command is also known as the printer management command Linux. This command is also known as the printer management command Linux. The lp command in Linux is one of the CUPS i.e. Common Unix Printing System. Syntax: lp [filename]
  • 32. Options of lp command d: to print the file using a particular printer. -n: print multiple copies of the document. -q: Set the priority of the printer in the printer queue. -t: to assign a name to the job. -o: assigns one or more job. -i: specifies an existing job to modify. -m: notifies the recipient when the job is completed. -h: denotes the hostname of the server. -E: forces the encryption while connecting to the server.
  • 33. The rmCommand The 'rm' means remove. This command is used to remove a file. The command line doesn't have a recycle bin or trash unlike other GUI's to recover the files. Hence, be very much careful while using this command. Once you have deleted a file, it is removed permanently. Syntax: rm <filename> Example: rm myfile1
  • 34. Options in rm rm *extension - Used to delete files having same extension. rm -r or R - To delete a directory recursively. rm i - Remove a file interactively. rm rf - Remove a directory forcefully.
  • 35. The cp Command cp stands for copy. This command is used to copy files or group of files or directory. It creates an exact image of a file on a disk with different file name. cp command require at least two filenames in its arguments. Syntax: cp [Source file] [destination file]
  • 36. cp R : If the command contains two directory names, cp copies all files of the source directory to the destination directory, creating any files or directories needed. This mode of operation requires an additional option, typically R, to indicate the recursive copying of directories. Syntax: cp -R [Src_dir] [des_dir] cp -i : i stands for Interactive copying. With this option system first warns the user before overwriting the destination file. cp prompts for a response, if you press y then it overwrites the file and with any other option leave it uncopied. Synatx: cp I [Src_file] [des_file]