Professional Documents
Culture Documents
Q. INLAB
Task 1
This activity is related to file permission. Perform the following tasks
SOLUTION
0. Create a file “testfile.txt” in /test directory
Firstly I have created the test directory by using mkdir /test command.
Page |1
1. View and read the file using Less command
I have entered the data first before running the less command and entered the data using
CAT > command into TESTFILE.TXT as shown below.
Page |2
5. Print the last 3 lines of the file using tail
As task is to print last 3 lines of textual data stored in testfile.txt. So I have used the
command tail –n 3, so it has printed the last 3 lines of the text as shown below.
TASK NO. 02
1. Find all the files with extension txt in the /test directory
2. Find the first line of the list of files in the /test directory
I have used the command ls /test |head –n 1 to print the first line of the list of files in /test
directory.
3. Find the last line of the list of files in the /test directory
I have used the command ls /test |head –n 1 to print the first line of the list of files in /test
directory.
Page |3
4. Produce and view a single sorted list of files by combining two directories: /Desktop and
/bin
I have used the command for above operation
and then following operations shown.
TASK No. 3
Perform the following tasks
1. Examine the network using Ping command and view the performance statistics
I have checked the networks using “PING LOCALHOST” command and the statics data is
show below from localhost….. This information is continuing processing and after few
steps I have Enter CTRL + C to stop this command for being running.
Page |4
2. displays a listing of all the “hops” network traffic takes to get from the local system to
yahoo.com
I was running tracerout yahoo.com command, but was successful due traceroute funcatinonaliy
was not install. So first I intalled it as show above and below.
Page |5
3. examine various network settings and statistics through netstat
I have used the command “NETSTAT -R” and then I came to known about the above
network settings and its statics. Netstat command can also be used to diagnose network
issues and service problems.
<***************************END**************************>
Page |6