Linux Unix Command Line Interface Advance Command

Aim: To study the basic LINUX commands.
List of Commands :Date command - used to display the current date.
Syntax : $ date
Cal command - displays calendar.
Syntax : $ cal month year
1. cal 2004 - displays the calendar for the year 2004
2. cal 4 2004 - displays the calendar for April 2004
Command grouping - used to execute the number of commands in a single
line.
a) ; - These commands are separated by a semicolon.
Syntax: command 1; command 2; ……command n
b) && - These commands are separated by & command
Syntax: command 1&& command 2&& ……command n
- here only if the first command is successful, the second command is
executed.
c) ! (pipe symbol) - Here commands are separated by ! symbol.
Syntax: command 1! command 2! ……command n
- Only if the first command is not successful, the second command is
executed.
id command - This command is used to display the numerical value
that corresponds to your login name.
File command - This command is used to determine the type of file
Syntax: file filename
More commands - used to display the contents of the file one screen at a time. Syntax: more filename
Less command - used to display the contents of the file one screen at a time. Syntax: less filename
CMP command - used to compare the 2 files and generate the first difference between the 2 files in the standard output.
Syntax: cmp file1 file2
bc command - used to perform simple mathematical calculation.
TTY command - used to know the terminal name, in which you are
currently login.
Tail command - used to display the bottom portion of the file. By
default it displays the last 10 lines of the file.
Lock command - used to lock the terminal for a while.
Result : Thus the basic LINUX commands are studied.

Related post