CHP 6 Commands 1
CHP 6 Commands 1
[ctrl+d] press( To
come out of file)
78 cat Ahmedabad Can view content of
file.
79 cat>>Ahmedabad Good morning will be
Good morning. added to file.
[ctrl+d] press( To
come out of file)
80 cat Ahmedabad Can view content of
file.
81 ls List of files and
directory.
82 cat>school
Ag High School. To create school file.
Navrangpura.
[ctrl+d] press( To
come out of file)
83 cat school Can view content of
file.
84 ls List of files and
directory.
85 cp school college Copy content of
school file to college
file.
86 mv school highschool Rename school file to
highschool file.
87 ls List of files and
directory.
88 cat>mumbai Mumbai file will be
It is a metro city. created.
[ctrl+d]
135 tr –s ‘ ’<stu All extra space will
be squeezed from
stu file.
136 grep: searching for a pattern.
It means search globally for a regular
expression and display lines where instances
are found.
137 grep “Gita” student From student file
gita’s record will be
displayed.
138 grep “science” student From student file
science student
records will be
displayed.
139 grep –v “sita” student From student file
except sita other
records will be
displayed.
140 grep –ic “Commerce” From student file
student all commerce
students record will
be counted and
displayed.