UNIT I Commands
UNIT I Commands
CA304
BCA-V Semester
Microsoft Word
• ln - Make link to files Document
• Soft Link
For Self Study: Understand the usage of Hard Link & Soft Link
General Unix Commands
Microsoft Word
• cal – Calendar
Document
Microsoft Word
• who [options]
General Unix Commands
Microsoft Word
Document
• more – Allows page wise display
• more [files]
Microsoft Word
Document
• whoami – Displays username
• whoami
Regular Expressions
What is it?
• String of ordinary and metacharacter which can be used to match more than
one type of pattern.
• Uses character set
• * , [], ^, $, {}, etc.
Microsoft Word
Document
The Shell Metacharacters.
• Translates character/characters.
• tr [option...] string1 [string2]
• cmp
• Compare 2 files. Microsoft Word
• cmp file1 file2 Document
Text Processing Commands
Microsoft Word
• cut Document
Microsoft Word
Document
• paste
• Merging the corresponding lines of given files.
• paste file..
Text Processing Commands
• sort Microsoft Word
Document
• Ordered arrangement.
• sort [option] file
• comm
• Compares 2 sorted files. Microsoft Word
Document
• wc [option...] filename...
• grep
Microsoft Word
• Pattern searching in a file. Document
Microsoft Word
Document
• uniq
• To remove adjacent repeated lines
• uniq [option] [file]
Can you answer these questions?
• Write a command-line to
• Count the number of files in the current directory