-
Create a directory FileContent in /home/[username]
-
Cd to FileContent
-
Create two file1 & file2 files using cat command as:
- Cat > file1
Start of file 1 This is first line of test file 1 This is second line of test file 1 End of file 1
- Cat > file2Start of file 2 This is first line of test file 2 This is second line of test file 2 End of file 2
-
Create a directory named as dirA
-
Write a command to find regular Expression “first line of test” in both files
-
What is output of using following options with above command :
- –c
- –i
- –v
- –n
-
Combine grep with pipe using | operator to search for all files with regular expression “First line of test”
-
Use sort and uniq command to sort file1 and file2 and store result in file3
-
Create a backup for file3 using tar command
-
What is output of using following options with above command :
- –c
- –v
- –f
- –t
- –x
-
Write a command to compress file2 using compress and file1 using gzip command
-
Write a command to de compress file2 and file1