oracle linux fundamentals

Upload: ereno

Post on 23-Feb-2018

249 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 Oracle Linux Fundamentals

    1/8

    Linux Fundamentals

    1-8turkyalasiri@twitter

    Linux Fundamentals

    :/Kernel:2/Shell:

    -:root:/

    2/Admin.)(

    -.

    -dr.

    ls (list)

    2Ls l

    3Ls l/etcetc4Touch f1 f2 f3 f1 f2 f35Clear

    6Cal

    7Cal 3 2014214

    8Date

    9Cd/Chang directory(Root)

    1Ls l a t(ls -lat)

    At

    Passwd

    2SuSwitch userroot3Su turkiturki4Pwd

    5Cd..)(

    6Cd /etcetc7Cd hostscd /etc/hostshosts8Cd ~/DocumentsDocumentsHOME9Cp f1 ~/ Documentsf1DocumentsHOME21Mv f1 ./f1root

    2Mv /f1 /etc

    *

    etcf1

    22mv Documents/test2 /Desktoptest2

    23Cd /

    24Ls a* a

    25Mkdir t1 t2 t1 t2

  • 7/24/2019 Oracle Linux Fundamentals

    2/8

    Linux Fundamentals

    2-8turkyalasiri@twitter

    26Rm a1a1

    27Rmdir t1t228Rm r t1t229Touch d{1,2,3,4} d1,d2,d3,d431Mkdir t{1,2,3,4} t1,t2,t3,t4

    3

    Mv t1 t6

    mv

    t1t6

    32Cat > w1 w1ctrl d

    33File w1

    34Cat w1

    35Cat >> w1

    36Uname oLinux

    37Uname -m

    uname -p

    38Uname -n

    39Uname --help

    41Uname a

    4Who

    42W

    43Nautilus

    44QQuit

    45Info lsls46Whatis lsls47Man passwd

    48Man:lsKonqueror

    49

    Who am i

    =turki pts/2 2014-01-08 (0:0)Turkipts/2

    51Type passwdpasswd)( 5Date;ls

    52Man k calendar

    calendar53Last

    54Users

    55Groups

    56Id

    57Id rootroot58Id turkiturki

    59Cat /etc/passwd

    61Cat /etc/group

  • 7/24/2019 Oracle Linux Fundamentals

    3/8

    Linux Fundamentals

    3-8turkyalasiri@twitter

    *ls l:

    Drwxr-xr-x]d[ownerowner

    other

    R=read

    w=write

    x=execute

    -

    =

    *:R=4w=2x=1=7:

    4+2=6 5=4+1

    Chmod 741 testfile

    ( 7( ()(1)4

    6Chmod 741 testfile testfile7=4==

    62Chmod rwxr-xr-x testfile

    63Wc test.txt

    =269 2442 17345

    test

    73452442269

    64Wc l

    65Wc w

    66Wc c

    67Ls l > text1.txt

    txet1

    68Cat /etc/shellsshells69Echo $HOMEHome71Echo welcomewelcome7Mkdir p 11/22/33 11121372Cd 11111173History

    74Touch {1,2,3}.txt

    75Rm f {1,2,3}.txt

    76Rm {1,2,3}.txt

    77Echo $(hostname)

    78Echo "This computer name is:

    $(hostname)"

    79Echo "This computer name is:

    $(hostname) and date is: $(date)"

    81Cdhome...

    homehome 8Cd~

    82Cd /homehome

  • 7/24/2019 Oracle Linux Fundamentals

    4/8

    Linux Fundamentals

    4-8turkyalasiri@twitter

    83

    Cat > myscript

    #This is my first script

    Echo "Greeting, the date and time

    is: $(date)"

    Echo "you working directory is:$(pwd)"

    )(: -

    #-

    -

    84Ctrl + d

    85Chmod +x myscript( )+(

    (x

    ) ( 86./myscript

    87

    Cat > myscript2

    #This is myscript2

    Echo "We like Linux : $(uname -a)"

    Echo "This month calendar is: $(cal)"Ctrl + d

    Chmod +x myscript2

    )(:2

    -

    #

    *:

    localhost:631

    .

    .

    *

    88Lpr mytest

    mytest

    89

    Lp mytest91Lpr -p hp2 testLpr -php2 testtesthp29Lpstat o

    92Lpq

    93Lprm 3434

    94

    Lpc

    ?

    = Exit help quit status

    ?4status quit

    exit

    95Lp helplp96Head test7

    test7

    97Head n3 test7test798Tail test7test799Tail n5 test7test7

    11Ls l > test3 | head test3

    test3

    (1)1More test3test312Less test3

    13Ls li tes5

    = 914237 rw-rw-r--. 1 turki turki 265

    Jan 15 : 10:41 test5

    (I-node

    )

    test5

    94237

  • 7/24/2019 Oracle Linux Fundamentals

    5/8

    Linux Fundamentals

    5-8turkyalasiri@twitter

    14Ln s( soft link)i-node

    (symbolic link )

    15ln( Hard link)i-node

    16Ln s test5 test100 test5test100

    17Ls li

    18Alias

    19Alias d22 ='ls lat' d22ls -lat1Sort /etc/passwd) )

    Sort r /etc/passwd) (

    2Grep

    3Grep S[ek] test7Sektest7

    4Grep ^[Ss] test7Sstest75Grep ^s test7s6Grep s test7s7Grep s$ tests8Grep v [A-Za-z] test7

    9Grep v [0-9] test7

    21Grep root /etc/passwdroot2Grep root /etc/passwdroot22Grep root$ /etc/passwdroot23Grep /home /etc/passwd/home

    24Diff A B

    A,B

    25Sed 's/sea/she' test7.

    -seashe

    26Sed 's/sea/she/g' test7seashe.g(gloobal)

    27Sed e 's/sea/she/g' e 's/sun/moon/g' test728Tar cvf

    29Tar cvf dir2 1.txt 2.txt dir21, 231Tar tvf dir2

    3

    Mkdir dir3

    Cp dir2 dir3

    Tar xvf dir2

    dir2

    dir3

    dir2

    32Gzip

    33Gzip 1.txt 2.txt234Ls1.txt.gz 2.txt.gz35Gunzip 1.txt

    36Gzip d 1.txt

  • 7/24/2019 Oracle Linux Fundamentals

    6/8

    Linux Fundamentals

    6-8turkyalasiri@twitter

    37Vi(Editor)38Vi test test39

    iEsc

    41ddEsc

    4wdEsc

    42HLEsc

    43JKEsc

    44yyEsc

    45pEsc

    46PEsc

    47wyyEsc

    48pEsc

    49

    Esc

    /

    sea

    sea

    n

    N51

    wEsc

    5qEsc

    52:Esc !q

    53Cut fTab

    54Cut f d:( )$ -d

    55

    Cat > test2

    111 222 333

    Aaa bbb ccc

    Ddd eee fff

    Ctrl d

    Cut f2 test2

    Tab

    .

    :

    222

    Bbb

    Eee

    56Cut f5 d: /etc/passwdpasswd

    57Sleep 500)(511

    58Ctrl z

    [2]+ stopped

    sleep

    -

    259Bg %2

    [2]+ sleep 500&

    back ground

    -&.

    61Fg %2forint ground

    6Ps)(Ram

    62Ps au (

    (

    63Jobs

    64Kill %2

    65Kill -9 %2

  • 7/24/2019 Oracle Linux Fundamentals

    7/8

    Linux Fundamentals

    7-8turkyalasiri@twitter

    66Uniq

    67Uniq tttt

    68Uniq u tt

    69Uniq c

    71Uniq cu

    7Find

    72Cd /

    Find name turki

    root

    turki

    73Find perm 777

    777Perm)(

    74

    Find . size +20 | more

    20

    .

    enter

    spice

    .

    *permission denied: root.

    ::*System/preference/about me

  • 7/24/2019 Oracle Linux Fundamentals

    8/8

    Linux Fundamentals

    8-8turkyalasiri@twitter

    Bin

    2Sbin( photo shop)

    3Boot

    4Dev(drivers)5Etc)( root6Home

    7LibC,C++8Lost+found

    9Media

    1Misc)(

    Mnt

    cd

    usb2Net

    3Opt

    4Proc

    5Rootroot6Selinuk

    7Srvserves8Sysserves9Tmp

    21Usr

    2Var(variables)