Search Engine

Tuesday, October 21, 2008

Tutorial I/O and Linux's Basic instruction

Tutorial I/O and Linux's Basic instruction

redirection's recognition and pipe
Redirection and pipe constitutes default from shell's facility at unix.

Redirection
redirection's facility enables we for can keep output from one process to be kept to other file
(Output Redirection) or contrariwise utilize content from file as input in a process (redirection's input).
Components from redirection is<, >, < <, > >
To its clearer will at gives example for each one redirection:

Output Redirection
We will utilize paint instruction already are of service default's ala at shell linux.
Syntaxnya as follows:
$ paint>
Example:
Making File by the name of test
arief@noize:~$ paint> test
this just one test from output redirection
hehehehehe........
^D
Seeing test file content
arief@noize:~$ test paint
this just one test from output redirection
hehehehehe........
arief@noize:~$
Increase for test file
arief@noize:~$ paint> > test
this the line affix from long time one...
^D
Seeing files loading back afters test be added some word
antoro@drutz:~$ test paint
this just one test from output redirection
hehehehehe........
this the line affix from long time one...
arief@noize:~$
Herein we see that output from paint instruction will at arches (redirect) to one file by the name of test.
1.1.2. Redirection's input
Content from a file we will utilize as input from a process who we will carry on. For example we will
try to send mail goes to self sendiridengan fills indigenous mail previous test file
arief@noize:~$ mail arief@noize< >Pipeline
Pipeline( | ) are facility at shell UNIX that functioning to give input from a process from output processes
another one. Let say for example:
Before we utilize pipeline
arief@noize:~$ find *
dead. letter
mbox
test
After we utilize pipeline
arief@noize:~$ find * | grep tests
test
arief@noize:~$
On pipeline's example upon, having that mean output from find's instruction becomes input from grep's instruction that
then just takes word "test" from output find.

Shell (bash command)
Shell is one program which read default input which is keyboard. While is we mengetikkan something at keyboard
therefore shell will paraphrase what does we ketikkan. For example if we ketikkan ls on shell and
ls apparently constitute program who can at eksekusi therefore shell will carry on that program.
For example:
arief@noize:~$ ls
test
arief@noize:~$ hello
bash: hello: command not found
arief@noize:~$
We can see that while our ls ketikkan therefore program ls is carried on, meanwhile if we carry on
hello and because really no program hello therefore shell that mengeksekusinya can't.
4.2. 1 shell's types
shell's type that is utilized at unix and also linux widely varied, but to be seen from user amount facet its shell
one that a lot of is used is as follows:
?? Bourne shell (sh)
?? C shell (csh)
?? Korn shell (ksh)
?? Bourne Again shell (bash)
All the much at utilizes is bash, where does this bash constitute development from sh and ksh. Majority
linux's distribution now utilizes bash as default shellnya.
4.2. 2 Take Orders basics in Linux

paint
Command this paint feature content from a file goes to standart output (stdout)
Syntax:
$ paint
Example:
arief@noize:~$ test paint
this just one test from output redirection
hehehehehe........
this the line affix from long time one...
paint can also be utilized to insert one content from a file into the other file.
Syntax:
$ file1's paint file3> file4
clear
This clear's instruction kindred with cls on its PACK utilised clears display
Syntax:
$ clear
cp
Alike with copy on PACK, this cp's instruction functions mengkopi file.
Syntax:
$ cp [option] file / dir / path /
To clearer pleases to be read by its option by carry on:
$ cp--help

cut
cut's instruction defines a meaty file data bases column
Syntax:
$ cut [option] file
Example: we that cut will test file from column 1 7
arief@noize:~$ cut c 1 7 tests
this han
heheheh
the line i.
antoro@drutz:~$ test paint
this just one test from output redirection
hehehehehe........
this the line affix from long time one...
arief@noize:~$
From example gets to appear that cut just feature content from test file from column 1 7

find
From its name can be guessed that this instruction functioning to look for file or directori even.
Syntax:
$ find / path [option]
Example:
arief@noize:~$ find. -name te*
./test
arief@noize:~$
grep
This instruction is beneficent for data search in file, purpose grep will more mengefisienkan time to weigh
shall read by piece
Syntax:
$ grep [option] "data" file
Example:
arief@noize:~$ grep "this" test
this just one test from output redirection
this the line affix from long time one...

ln
Utility commands this is subject to be make link from one file / directori goes to file / directori any other
Syntax:
$ ln s / path / to / source target
Example:
arief@noize:~$ ln s test tests
arief@noize:~$ ls l
full scale 2
-rw r--r-- 1 arief@noize 102 Nov 9 14:11 tests
lrwxrwxrwx 1 arief@noize Nov 4 10 03:21 quizs -> test
arief@noize:~$
From example gets to be seen that file tests is constitute link from test file
locate
This instruction is utilized to know where its position one file or directori. Its function is thereabouts with
with find, locate's difference utilizes one database (usually lies at / var / lib / locatedb) one that
can at update utilizes to command updatedb.
Syntax:
$ locate
Example:
arief@noize:~$ locate tests
/home / arief / tests
arief@noize:~$

ls
This instruction as as at r on yanitu's PACK functions to feature content from a directory atributatribut therewith
its file.
Syntax:
$ ls [option] /directory
Example:
arief@noize:~$ ls / home / arief
test tests
arief@noize:~$

mkdir
mkdir ekivalen's instruction with md (make directory) on beneficent PACK to make one directory.
Syntax:
$ mkdir

mv
This instruction is kindred by order of move on beneficent PACK to move file from one directory goes to
another directory, or can also be utilized as substitution of file name (ren / rename on PACK)
Syntax:
$ mv file1 is files
rm and rmdir
Instruction rm is command to erase file. To directory can utilize rmdir
Syntax:
$ rm
$ rmdir

tail
This instruction contrary by order of cut, tail defines one data on rows terminological file it. Little bit
the difference is on tail default's ala is featured 10 rows most a stop to file contents
Syntax:
$ tail [option]
Example:
arief@noize:~$ tail is test
this just one test from output redirection
hehehehehe........
this the line affix from long time one...
arief@noize:~$
If we want to feature just 2 last rows utilize option[- [nilai] For example:
arief@noize:~$ tail 2 tests
hehehehehe........
this the line affix from long time one...
arief@noize:~$

mount
Each device in linux to be able to being accessed beforehand have at mount or to be concerned.
Syntax:
$ mount [option] /dev / / path / to / mountdir
Example:
$ mount / dev / hda1 / mnt / is disc

ps
This instruction is utilized to see each process which is carried on in therewith number machine its process.
Syntax:
$ ps [option]

kill
kill's instruction (turned out) by name it is functioning to send signal goes to a process. So
can command if a process is delayed, discontinued or to be drawned out. But right usually been utilized for
turned out process which be walks.
Syntax:
$ kill
adduser, passwd and userdel
adduser's instruction and userdel is files for user's administration. adduser is utilized to add
user at one particular machine. Then afters adds to be determined password user a new one that by order of
passwd. Meanwhile userdel is utilized to erase user at machine. To carry on takes orders it
necessary root priviledge.
Syntax:
# adduser
# passwd
# userdel[-r]

Such a degree Turial from me, hopefully utilitarian for you all.. linux goes forward to go on barefisted..

No comments: