Question

Perform the following tasks in Linux

(i) Display the first 15 lines and last 20 lines of a text file (you need to create a text file)

(ii) Identify all files in your home directory which a group has written permission on it

(iii) What will be the output of the following commands:

  • ls | head – 5 | tail -1 > myfile cat myfile
  • ls –l / etc | tail – n + 2 | sort

 

08 Feb 2021
Answer :
Word Count : 393

(i) Display the first 15 lines and last 20 lines of a text file:

To create a text file and then display the first 15 lines and last 20 lines, you can follow these steps:

1. Open a terminal in Linux.

2. Create a text file, for example, "mytextfile.txt," and add some content to it. You can use a text editor like nano or vi, or simply use the `echo` command to add text.

   ```bash
  ________ _________ ____ ________ ___ _________ ____ ____ ____ _____ ______.
___ ________ _____ _________ _________.
_________ _____ _______ _________ __________ ________ _______.
______ _________ _____ ________ ______ ________.
____ _________ ____ _____ ________.
____ _____ ______ _______ ___.
__________ __________ _________ ____ ____.
_________ __________ ______ ____ _______ ____ ___ _____ _______ __________ ______.
____ ________ _________ ________ ____.
_________ __________ ____ _____ ______ _____ ______ ____.
__________ ___ ___ ____ _______.
___ ______ __________ ______ _____ ____ ________ _________ ________ _____ _________ ___.
_________ ____ _______ _______ _____ __________ _____ __________ _______ _____.
_______ ____ _____ __________ ____ _________ __________ ______ ___ ______ ______ ______.
____ __________ ________ _______ ________ ______ _______ ________ ____ ________ ______ ________.
___ ___ ____ __________ _______ ______ _________ ______ __________ ________.
__________ ____ _________ _________ _____ ______ _____ ____ ____ ______.
_______ ____ _________ _________ __________ _______ ___ _____ ___ __________ __________ ______.
____ ___ ______ ___ ____ ___ ____ _________.
______ ________ _________ _________ ____ _____ ___ ______ _____ _____ __________ _________.
_____ _____ _____ ________ _________ ________.
________ _________ _________ _________ ________ ______ ________ ___.
__________ _______ ____ _________ _________.
__________ __________ _________ ___ ____ ____ ________ ______.
___ ________ __________ __________ ___.
__________ ____ _________ __________ ________ _______ ___ ______ ___ __________ _________.
____ _______ ______ _____ __________ ___ ________ ________ _____.
_______ _________ _______ ____ _____ ___.
_____ ___ ___ _______ _________ ________ _____ ____ _______ ___ _______ ________.
______ _____ ____ ___ ________ _____.
________ _____ ______ ____ ____ _____ __________ ___ _____ _________ ________.
_____ _____ _________ ____ ______ _______.
_________ _________ _____ _______ _____ __________ ______ ____ ______ ____ _______.
_________ ________ _____ ______ ______ ______.
____ _______ ________ _____ ____ __________ _____ ________ ______.
____ ________ __________ _________ _________ ______ __________.
________ ___ ________ ______ _____ ______ ____ _________ ______ _________ _____.
___ ____ _______ ________ __________.
__________ ________.
Get Full Answer on WhatsApp

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Perform the following tasks in Linux(i) Display the first 15 lines
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support