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 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 printf command tutorial with examples

Like a C language, in UNIX “ printf ” is used to print the statement. “ printf “ command is an alternative of “echo” command. Print statement: To print any statement write “printf” command in terminal and the in the double quote ” ” write a sentence to be print. Whatever you will write in … Read more

Linux and Unix wc command tutorial with examples

“ wc ” command stands for “word count”. “ wc “ command in Unix/Linux OS is used to calculate/find out and print the number of lines, number of words, number of character and byte of a file. Syntax: $ wc [option] [filename] Example: There is a sample file file01.txt.

Type command on terminal…

Read more

Linux and Unix bc command tutorial with examples

bc command is used to perform the basic calculation. Example: To add two number write “bc” command on terminal and press enter then specify two number as mention below for addition.

Note: bc command print the result of computation in next line as shown above. Perform multiple calculations: we can perform multiple calculations on … Read more

Linux and Unix mkdir command tutorial with examples

mkdir stands for make directory. In the UNIX file system, we can create a new directory by using mkdir command. Syntax:

Note: In above syntax in the place of [directory name] we will specify the name of directory to be created. Example:

The directory abc is created. To confirm directory is created press … 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 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 passwd command tutorial with examples

passwd command stands for the password. By using passwd command we can change the password of a user account in Unix system. Steps for change password. 1. Enter the command “passwd” on the terminal and press enter. 2. System asks for old Unix password then the user will enter old Unix password. 3. System asks … Read more

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