Write the LINUX commands for the following:
(a) To display the present working directory. Make a directory with your name and add a text file
with the file name “text1”.
(b) To create any empty file using touch command.
(c) To move a file from one directory to any other directory.
(d) To display the first 10 lines of any text file.
(e) To grant the permissions of read and execute to the user and execute only permission to the
group and others for all the files in a current directory.
(f) To display the file content in a reverse order (from the last line) of any text file.
(g) To diplay the User ID / Group ID.
(h) To compare two files or streams.
(i) To translate the file content from lower case to upper case.
(j) To count no. of lines, words and characters in a file.
Sure, here's a guide to perform each of the tasks on both Linux and Windows command line:
### Linux Commands:
(a) Present Working Directory & Creating Directory/File:
```bash
pwd # To display the present working directory
mkdir YourName # Create a directory with your name
cd YourName # Navigate to the created directory
touch text1.txt # Create a text file named "text1"
```
(b) Create Empty File Using Touch Command:
```bash
touch filename.txt # Creates an empty file named "filename.txt"
```
(c) Move a File from One Directory to Another:
```bash
mv /path/to/source/file /path/to/destination/directory # Moves a file from source to destination
```
(d) Display First 10 Lines of a Text File:
```bash
head filename.txt # Displays the first 10 lines of the file "filename.txt"
```
(e) Set Permissions for Files in Current Directory:
```bash
___ __________ _______ _______ _________.
_________ ________ ___ _______ _______ __________ __________.
_______ _______ ________ ________ _________ ___ __________ ______.
________ ____ ________ _________ _____ ____ ______ _____ ________.
__________ ____ _________ _________ ___ _____.
__________ ________ _________ __________ ______ ______ ________.
_____ __________ ______ ____ ______ ____ _____ ___ __________ ________ ___ ________.
__________ _______ _________ ___ ______ _________ ________ ________ ________.
______ _____ _________ ____ _________ ____ ___ ________ ____ _______ _______.
____ ____ ________ ______ _________.
_________ __________ _______ __________ ____ ______ _________ __________ __________ ____ __________.
_____ _____ __________ ________ ________.
_____ ____ ___ _____ ______ ________ ___ ________ ____ ____ __________ _______.
_______ _________ ______ ________ ________ _______.
______ ________ ___ __________ ____ _________ _____ _______ _______ _____ ___ _____.
_______ _______ _______ ________ ________ _________ ______ _______ _____ ____ _________.
__________ _________ _____ __________ ____.
____ ____ _________ _____ __________ ________ ____.
_______ __________ ____ ______ ______ ______.
_______ ____ ___ _______ _________ _______.
_________ ______ ____ _________ ____.
_______ ________ ___ _______ ___ __________ _______ ________.
____ ____ ________ __________ ____.
_________ __________ _________ _____ _____ _______ ____ ______.
________ ___ ____ ______ ____.
________ ____ _______ ________ ________ __________ ___ __________ _____ __________ ______.
__________ _________ ________ __________ __________ ___.
___ _____ _______ _________ _______.
__________ _______ __________ ____ ____ ___.
_______ ___ _________ _________ __________ _____ _______.
____ ___ ____ __________ __________.
_____ _______ ____ ______ ______ _______ _______ ___ __________ ___ ______ ___.
_______ _______ _______ _______ _______.
__________ __________ ___ ________ _______ _______ ________ ___ __________.
_______ ____ ___ _______ _______ ____ ___ ______.
_____ _____ ____ _____ __________ ___ __________.
___ _______ _____ _____ _____ ________ _____ ____ ____ _______ ______ ________.
______ _____ ______ ____ _________ _____ __________ ________.
_________ __________ _________ ____ _______ __________ ____ _______ __________ _________ _________.
________ ____ _________ __________ ___ ____ ___ ____ ______ _______.
____ _________ ____ _________ _______ _________ ______ _________ _________ _____.
________ _____ _____ _________ __________ _________ ___ ____ ____ ___ _____.
_______ _____ _______ ___ ________ __________ _________ ________.
___ _____ _____ __________ ___ _____ ___.
________ ________ _____ _____ _____ ______ ______ __________ ______.
____ ________ __________ _____ ____ ________ ______ _______.
_________ ___ ____ ___ __________ ___ ____ _______ _______ __________ ___ ________.
____ ___ ________ __________ _____ ____ ______ ______ ___ _____ __________.
_____ ______ ________ ____ ________ ______ ________ _______ ____.
________ _______ _____ ___ _________ ________ _______ _______ ___ _____ __________ __________.
__________ ________ ____ ______ ________ ____ ____ _________ ___ _______.
________ ______ _________ ____ ___.
______ _____ __________ _____ __________ _________ _____ __________.
_________ __________ ________ ___ ______ _______ _______ ______ _________.
________ _________ ______ _____ __________ _____ _____ _______ _______ ________ _______ ________.
_______ __________ __________ ________.
Get Full Answer on WhatsApp