Senin, 18 Januari 2016

Learn Basic Linux-Command | PART 2

Arief-jr.blogspot.com - In previously post have been discussed about Learn Basic Linux-command | PART 1, now i will explain sequel.


File Descriptor

 

  1. Output to monitor (standard output), input from system (kernel)
  2. $ ps
  3. Output to monitor (standard output), input from keyboard (input standard)
  4. $ cat hello, what's up!!! hello, what's up!!! exit with ^d [ctrl+d]
  5. Input from keyboard and output to internet address
  6. $ mail arief-jr@gmail.com
  7. Input name directory, nothin output (create new directory), if an error then error display on screen (screen standard)
  8. $ mkdir [dir name] $ mkdir mydir (there error message, because this directory already created)


Redirection



  1. Output standard redirect
  2. $ cat 1> filename.txt this is a text created by me
  3. Notation 2>&1: Error standard redirection (2>) is identical with file descriptor 1.
    $ ls newfile (there error message)
    $ ls newfile 2> result.txt
    $ cat result.txt
    $ ls newfile 2> result.txt 2>&1
    $ cat result.txt

  4. For standard output redirection to file, use operator >
  5. $ echo hello
    $ echo helllo > output
    $ cat output
  6. Input standard redirect and output standard can combined but do not us sama file name as input standard or output
  7. $ cat < output > out
    $ cat out
    $ cat < output >> out
    $ cat out
    $ cat < output > output
    $ cat outpit
    $ cat < out >> out (process won't stop)
    $ cat out

Pipeline

  • Pipeline operator ( | ) used for make process execute by passing data driectly to other data
$ who
$ who | sort
$ who | sort -r
$ who > tmp
$ sort tmp
$ rm tmp
$ ls -l /etc | more
$ ls -l /etc | sort | more

Filter

  • Pipeline also used for combines the utility system to form more complex functions
$ w -h | grep
$ greo user /etc/passwd
$ ls /etc | wc
$ ls /etc | wc -l


Maybe that my explain about Linux-Command. So if you want learning, please. Because learning not need younger, smart or experience and other the most important we still understand.

"There is a will there is a way"

There may be suggestions or ideas that you want to add or also sharing ? please add and contact me via Google+  


Thanks, may be useful and good luck!!! Arief

Tidak ada komentar:

Posting Komentar