You are on page 1of 8

5.

cat Command

Description: cat command(concatenate) is very frequently used in Linux It


reads data from the file and gives their content as output. It helps us to create,
view, and concatenate files.
Syntax: cat <file name>
Example: cat krishti.txt
Output:

6. date Command

Description: The date command is used to display the system date and time.
By default the date command displays the date in the time zone on which
Unix/Linux operating system is configured.
Syntax: date
Example: date
Output:
7. history command

Description: The history command is used to view a history of all the


commands previously executed inside the base terminal.
Syntax: history
Example: history
Output:

8. uname Command

Description: This command prints detailed information about your Linux


system.
Syntax: uname
Example: uname
Output:
9. pwd Command

Description: ‘pwd’ stands for ‘Print Working Directory’. As the name states,
command ‘pwd’ prints the current working directory or simply the directory
user is, at present. It prints the current directory name with the complete path
starting from root (/).
Syntax: pwd
Example: pwd
Output:

10. ls Command

Description: The ls command lists files and directories within the file system,
and shows detailed information about them.
Syntax: ls
Output:
11. head Command

Description: The ‘head’ command displays the starting content of a file.


By default, it displays starting 10 lines of any file.
Syntax: head <file name>
Example: head krishti.txt
Output:

12. tail Command

Description: The ‘tail’ command is used to display the last ten lines of one or
more file. By default, it displays last 10 lines of a file.
Syntax: tail <file name>
Example: tail krishti.txt
Output:
13. mv Command

Description: mv stands for move. mv is used to move one or more files or


directories from one place to another in a file.
Syntax: mv [option] source destination
Example: mv krishti.txt file.txt
Output:

14. rm Command

Description: The ‘rm’ means remove rm command is used to remove objects


such as files, directories, symbolic links and so on from the file system like
Linux.
Syntax: rm <file name>
Example: rm file.txt
Output:
15. cp Command

Description: cp stands for copy. This command is used to copy files or group
of files or directory.
Syntax: cp [option] source destination
Example: cp krishti.txt file.txt
Output:

16. clear Command

Description: In Linux, clear is built-in command which is used to clear


terminal screen.
Syntax: clear
Example: clear
Output:
17. less Command
Description: Less command is a Linux utility that can be used to read the
contents of a text file one screen at a time.
Syntax: less <file name>
Example: less krishti.txt
Output:

18. more Command


Description: more command is used to view the text files in the command
prompt, displaying one screen at a time in case the large file is large.
Syntax: more <file name>
Example: more krishti.txt
Output:
19. grep Command
Description: The grep filter searches a file for a particular pattern of characters,
and displays all lines that contains that pattern.
Syntax: grep ‘word’ <file name>
Example: grep ‘Linux’ demo.txt
Output:

20. chmod Command


Description: Linux chmod command is used to change the access permissions
of files and directories. It stands for change mode.
Syntax: chmod <option> <permissions> <file name>
Example: chmod 777 demo.txt
Output:

You might also like