Home » , » Basic RHCE commands using help for commands

Basic RHCE commands using help for commands

Written By 1 on Sunday, February 6, 2011 | 7:48 PM



In this article I will show some basic system administration related task which a normal user can perform. To complete this assignment login from normal user which we created in our first assignment.
basic rhce commands

How to count line word and character form a file


$wc [file name]
This command is used to count line words and character of file. Out will first show the line number word and in the end characters.

$wc test
2 4 23 test
basic rhce commands
In this example there are 2 lines 4 words and 23 character in test file.

how to display top and bottom line form files


$head –n [number] [file name]
head command is used to display specific number of line from top for given file.

$head –n 4 test
For example this command will show the 4 top most line of file test.
basic rhce commands

$tail –n [number] [file name]
tail command will display the specific number of line form bottom for given file.

$tail –n 3 test
This command will display the 3 line from bottom of file test

how to find wrong spelling and correct them

$spell [file name]
spell command will display the wrong spelling of files.

$spell test
This command will display the wrong spelling of test file. If there is no spelling mistake no out will show.
basic rhce commands

$aspell check [file]
This command is used to correct the spelling related mistake in any given files.

$aspell check test
This command will show the all wrong spelling from test file and there possible corrections. To use correction just press the number shown in front of words.

how display logged in user information and terminal number


$who am i
This command is use to display the username of currently logged.

$who
This command will display all the user currently logged in all terminals.
basic rhce commands

$tty
This command is used to display the terminal number of currently logged in terminals.





how to display date time and calendar


$cal
This command will display the calendar of current month. You can see the calendar of any specific year also.

$cal 2010 |more
basic rhce commands
This will display the calendar of year 2010. As output will be more than a page so use more switch with commands.

$date
This will the current system times and date.





how to use calculator


$bc
basic rhce commands
This command will launch the calculator at command prompt. Write down your calculations and press enter to get the answer. Use CTRL+D key combination to exit from calculator.

how to get help about commands


$info [command]
info command is used to get help about any commands.

$info cat
This will display the help about cat commands. Generally output of info commands is more a then a page. You can quit form this out by just pressing q.

$command - - help
This help options is really very useful when do not want to be read full manual page for help. This will provide very basic help like which switch will work with this command.

$cat - - help
This will show the available switch cat command and a very brief descriptions about these switches.

$man [command]
If want to read the detail about any command use this command. This will give you the complete detail about commands.

$man cat
This command will give the complete details about the cat commands including switches and their usages. Use q to quit from the output of this commands.

$less [file]
When you have a file more than one pages use less command to read the output of file despite of using cat command with more switch. As with more switch you cannot scroll the text in both directions.

$cat [file] |more
If you have a file more than one page than use |more switch with cat to read the output. Without this switch matter of file will scroll too fast that you will see only texts of last pages.

0 Comment:

Post a Comment