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