Calculator command, echo command, clear command, man command, pwd command, list command
6.’Basic’ Calculator Command :
It will change the „$‟ mode and in the new mode, arithmetic operations such as
+,-,*,/,%,n,sqrt(),length(),=, etc can be performed . This command is used to
go to the binary calculus mode.
Syntax :
$bc
operations
ibase –inputbase
obase – outputbase are used for base
conversions.
Base :
Decimal = 1
Binary = 2 Octal = 8 Hexa = 16
7.Echo Command :
This command is used to print the arguments
on the screen .
Syntax :$echo <text>
Multi line echo command :
To have the output
in the same line , the following commands can be used.
Syntax :$echo <text\>text
To have the output in different line, the
following command can be used.
Syntax :$echo “text
>line2
>line3”
Example: # echo
"linoxide.com"
Output: linoxide.com
8.’CLEAR’ Command :
It is used to clear the screen.
Syntax :$clear
Example: #clear
Output: Its clear all the
screen.
9.’MAN’ Command :
It help us to know about the particular
command and its options & working. It is like „help‟ command in windows .
Syntax :$man <command name>
Example: man echo
Output: echo command options & working details.
10.pwd command:
‘pwd’ command prints the absolute path to
current working directory.
Example:#pwd
Output: /home/raghu
11.LIST Command :
It is used to list all the contents in the
current working directory.
Syntax :$ls – options <arguments>
If the command does not contain any argument
means it is working in the Current directory.
Options :
a– used to list
all the files including the hidden files.
c– list all the
files columnwise.
d- list all the
directories.
m- list the files
separated by commas.
p- list files
include „/‟ to all the directories.
r- list the files
in reverse alphabetical order.
f- list the files
based on the list modification date.
x-list in column
wise sorted order.
l- displays a long
listing of the files.
Example:ls -l
Output: total 4
drwxr-xr-x 2 raghuraghu 4096 2012-07-06 12:52 example
-rw-r--r-- 1
raghuraghu 0 2012-07-06 12:52 file1.txt
-rw-r--r-- 1
raghuraghu 0 2012-07-06 12:52 file2.txt
-rw-r--r-- 1 raghuraghu 0 2012-07-06 12:52 file3.txt
Comments
Post a Comment