Linux and Unix Cal command tutorial with examples

Command “cal” stands for calendar.This command is used to see the calendar of a specific month/ year or both.The basic syntax of command “cal”.

[month]- is used for specify month[year] – is used for specify year cal command to display calendar of current month type “cal” command on terminal and press enter and output … Read more

Linux and Unix mv command tutorial with examples

“mv” command is used to moves a group of file to a another/different directory. “mv” command can also use to rename file and directory. This command does not create a new copy of file , it only rename it. When we rename it does not consume any additional space on the disk. Syntax:

Example … Read more

Linux and Unix tail command tutorial with examples

Linux and Unix tail command is one of the important command. Command tail displays the bottom/end of the file at the terminal. When “tail” command is used without any option it will display the bottom/end ten lines of the file. Syntax of tail Command in Unix and Linux Syntax:

Example of tail Command in … Read more

Linux and Unix sort command tutorial with examples

Command sort is used to display/arrange the content of the text file in ascending or descending order. By default, sort command sorts the entire lines. Syntax:

Example: Suppose we have a file Employee.txt as shown below and we want to sort the content of the file and display at the terminal. By default sort … Read more

Linux and Unix head command tutorial with examples

Command head displays the beginning/top of the file at the terminal. When “head” command is used without any option it will display the beginning/top ten lines of the file. Syntax:

Example: Suppose we have a file Employee.txt as shown below and we want to see the beginning/top of this file by default it will … Read more

Linux and Unix tee command tutorial with examples

Command tee displays the output of the command and at the same time it saves this output in a file specified by the user. “tee” command can be used anywhere along with pipeline. Example: Suppose we have a file Data.txt as shown below and we want to see the content of this file and at … Read more

Linux and Unix rm command tutorial with examples

“rm” command is used to remove/delete files. this command can delete more than one file at a time. “rm” command can also delete the specific file from the directory. Syntax:

Example: Suppose we want to delete a file Mybook01 then the command is as follows:

Note: File ones delete can’t be regained. Delete … Read more

Linux and Unix cat command tutorial with examples

cat command is used to see the content of the file. cat command is also used to concatenate two or more file. cat command is also used to create new files. Syntax:

Suppose we have two files Employee.txt and Data.txt as shown below:

File 1: Employee.txt File 2: Data.txt Example: To see the … Read more

Linux and Unix ls command tutorial with examples

ls command list all the file and directory name present in the current directory. Syntax:

Example: Print the name of all the directory and file available in the current directory.

Above command display four file and directory name. Check availability of file or directory: We can check whether a particular file or directory … Read more

Linux and Unix cd command tutorial with examples

Command cd stands for Change Directory. You can change directory or move from one directory to another directory by using cd command. Syntax:

Example: pwd command display the absolute path name of current directory. To see the current directory absolute path press pwd command on terminal.

We are currently in “ it ’ … Read more