A shell is a special user program that provides an interface to the user to use operating system services. Shell accepts human-readable commands from the user and converts them into something which the kernel can understand. It is a command language interpreter that executes commands read from input devices such as keyboards or from files. The shell gets started when the user logs in or starts the terminal.
- Displaying the file contents on the terminal:-
- cat: It is generally used to concatenate the fil It gives the output on the standard output.
- more: It is a filter for paging through text one screenful at a
- less: It is used to viewing the files instead of opening the Similar to more command but it allows backward as well as forward movement.
- head: Used to print the first N lines of an It accepts N as input and the default value of N is 10.
- tail: Used to print the last N-1 lines of a fil It accepts N as input and the default value of N is 10.
2. File and Directory Manipulation Commands:-
- mkdir: Used to create a directory if not already exist. It accepts the directory name as an input parameter.
- cp: This command will copy the files and directories from the source path to the destination It can copy a file/directory with the new name to the destination path. It accepts the source file/directory and destination file/directory.
- mv: Used to move the files or directories This command’s working is almost similar to cp command but it deletes a copy of the file or directory from the source path.
- rm: Used to remove files or directories
- touch: Used to create or update a file.
3. Extract, sort, and filter data Commands:-
- grep: This command is used to search for the specified text in a.
- grep with Regular Expressions: Used to search for text using specific regular expressions in.
- sort: This command is used to sort the contents of files.
- WC: Used to count the number of characters, words in a file.
- cut: Used to cut a specified part of a.
4. Basic Terminal Navigation Commands:-
- ls: To get the list of all the files or folders.
- ls -l: Optional flags are added to ls to modify default behavior, listing contents in extended form – l is used for “long” output.
- ls -a: Lists of all files including the hidden files, add -a flag.
- cd: Used to change the.
- du: Show disk USA
- PWD: Show the present working.
- man: Used to show the manual of any command present in Li.
- rmdir: It is used to delete a directory if it is.
- ln file1 file2: Creates a physical.
- ln –s file1 file2: Creates a symbolic.
- locate: It is used to locate a file in Linux System.
- echo: This command helps us move some data, usually text into a.
- df: It is used to see the available disk space in each of the partitions in your system.
- tar: Used to work with tarballs (or files compressed in a tarball archive).
- File Permissions Commands: The chmod and chown commands are used to control access to files in UNIX and Linux systems.
- chown : Used to change the owner of the.
- chgrp : Used to change the group owner of the.
- chmod : Used to modify the access/permission of a.