CodeSpud

Linux Commands #1

May 28, 2006

www.oracle .com articles

According to the linux Howto, below is the basic format for linux commands.

command [option] [source file(s)] [target file]

To get some inline help while on console mode. try any of the ff:

  1. man “command”

> man echo
ECHO(1) User Commands ECHO(1)

NAME
echo - display a line of text

SYNOPSIS
echo [OPTION]... [STRING]...

DESCRIPTION
NOTE: your shell may have its own version
of echo which will supercede the version
described here. Please refer to your shells
documentation for details about the options
it supports.

Echo the STRING(s) to standard output.

-n do not output the trailing newline

-e enable interpretation of the backslash-
escaped characters listed below

-E disable interpretation of those sequences
in STRINGs

--help display this help and exit
...

  1. whatis “command”

>whatis echo

echo (1) - display a line of text
echo (1p) - write arguments to
standard output
echo [builtins] (1) - bash built-in commands,
see bash(1)
echo [curs_inopts] (3x) - curses input options
  1. help “command”

>help echo

echo: echo [-neE] [arg ...]
Output the ARGs. If -n is specified, the
trailing newline is suppressed. If the -e
option is given, interpretation of the following
backslash-escaped characters is turned on:
a alert (bell)
b backspace
c suppress trailing newline
E escape character
f form feed
n new line
r carriage return
t horizontal tab
v vertical tab
backslash
num the character whose ASCII code is
NUM (octal).

You can explicitly turn off the interpretation
of the above characters with the -E option.

Each command displays different degrees of information regarding the command providing flexibility in mastering the console shell. In the next posts of this series, a “help” sheet of the command of the day will be provided. I’ll also try to provide usage samples.

By @codespud  
DISCLAIMER This is my personal weblog and learning tool. The content within it is exactly that – personal. The views and opinions expressed on the posts and the comments I make on this Blog represent my own and not those of people, institutions or organisations I am affiliated with unless stated explicitly. My Blog is not affiliated with, neither does it represent the views, position or attitudes of my employer, their clients, or any of their affiliated companies.