Next Previous Contents

5. Xrhsh Katalogwn

5.1 Katalogoi: Arxika Sxolia

Eidame tis diafores metaju twn arxeiwn sto DOSWin kai sto Linux. Oson afora toys katalogoys, sto DOSWin o rizikos katalogos einai \ kai sto Linux einai /. Omoiws, oi fwliasmenoi katalogoi xwrizontai me \ sto DOSWin, enw me / sto Linux. Paradeigmata diadromwn arxeiwn:

DOS:    C:\PAPERS\GEOLOGY\MID_EOC.TEX
Linux:  /home/nikos/papers/geology/middle_eocene.tex

Ws synh8ws, .. einai o patrikos katalogos (parent directory) kai . einai o trexwn katalogos (current) directory. Na 8ymaste oti to susthma den epitrepei na trejete tis cd, rd, kai md opoy 8elete. Ka8e xrhsths diathrei ta pragmata toy se enan katalogo poy onomazetai «oikeios» (home), poy didetai apo to diaxeiristh toy systhmatos· paradeigmatos xarin, ston ypologisth moy o oikeios katalogos moy einai o /home/nikos.

5.2 Dikaiwmata Katalogwn

Kai oi katalogoi exoyn dikaiwmata. Isxuoyn osa eidame sthn enothta Dikaiwmata kai idiokthsies , dhladh ta xrhsths (user), omada (group) kai alloi (other). Sthn periptwsh twn katalogwn, to rx shmainei oti mporeite na allajete ston katalogo kai w oti mporeite na diagracete ena arxeio toy katalogoy (sumfwna me ta dikaiwmata toy arxeioy fysika) h kai ton idio ton katalogo.

Gia paradeigma, gia na krathsw toys alloys xrhstes makria apo to arxeio /home/nikos/text:

$ chmod o-rwx /home/nikos/text

5.3 Katalogoi: Metafrash Entolwn

DIR:            ls, find, du
CD:             cd, pwd
MD:             mkdir
RD:             rmdir
DELTREE:        rm -rf
MOVE:           mv

Paradeigmata

DOS                                     Linux
---------------------------------------------------------------------

C:\NIKOS>DIR                            $ ls
C:\NIKOS>DIR FILE.TXT                   $ ls file.txt
C:\NIKOS>DIR *.H *.C                    $ ls *.h *.c
C:\NIKOS>DIR/P                          $ ls | more
C:\NIKOS>DIR/A                          $ ls -l
C:\NIKOS>DIR *.TMP /S                   $ find / -name "*.tmp"
C:\NIKOS>CD                             $ pwd
        n/a - vlepe simeiwsi            $ cd
        omoiws                          $ cd ~
        omoiws                          $ cd ~/temp
C:\NIKOS>CD \OTHER                      $ cd /other
C:\NIKOS>CD ..\TEMP\TRASH               $ cd ../temp/trash
C:\NIKOS>MD NEWPROGS                    $ mkdir newprogs
C:\NIKOS>MOVE PROG ..                   $ mv prog ..
C:\NIKOS>MD \PROGS\TURBO                $ mkdir /progs/turbo
C:\NIKOS>DELTREE TEMP\TRASH             $ rm -rf temp/trash
C:\NIKOS>RD NEWPROGS                    $ rmdir newprogs
C:\NIKOS>RD \PROGS\TURBO                $ rmdir /progs/turbo

Shmeiwseis:


Next Previous Contents