Jul07

Tutorial CVS dan Grep di Linux

barusan diajarin Kang Rizal & Pak Ikin tentang CVS dan grep di linux, so here the explanation

coder4@dev gorilla2 $ cvs -q -n up -d

berfungsi untuk mengecek status file, mesti diapaalin neh arti dari parameternya silahkan cek di manualnya

U presentation/controller/PageController.class.php
U presentation/view/clique_fanclub/common/templates/admins/editorial.tpl
U presentation/view/clique_fanclub/common/templates/admins/index.tpl
? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c

symbol U berarti itu adalah file yang teah terupdate
symbol ? berarti file tsb belum diapa-apakan, dan berada pada client

coder4@dev gorilla2 $ cvs -q up -d

nah kalo ini berarti penyesuaian file segera dilakukan

U presentation/controller/PageController.class.php
U presentation/view/clique_fanclub/common/templates/admins/editorial.tpl
U presentation/view/clique_fanclub/common/templates/admins/index.tpl
? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c
coder4@dev gorilla2 $ cvs -q -n up -d
? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c
coder4@dev gorilla2 $ touch apaaja
coder4@dev gorilla2 $ cvs -q -n up -d
? apaaja
? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c


coder4@dev gorilla2 $ cvs add apaaja

berfungsi untuk me-add file yang baru saja dibuat dan file tersebut belum ada pada cvs server

cvs add: scheduling file `apaaja’ for addition
cvs add: use ‘cvs commit’ to add this file permanently
coder4@dev gorilla2 $ cvs -q -n up -d
A apaaja
? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c

coder4@dev gorilla2 $ cvs commit apaaja

berfungsi untuk melakukan update FINAL file apaaja ke server, dibawah ini bisa ditulis tentang catatan paerubahan file, karena di sini lagi ngetest maka kutulis “testeuy”

GNU nano 1.3.4 File: /tmp/cvsrdP4Pe

CVS: ———————————————————————-
CVS: Enter Log. Lines beginning with `CVS:’ are removed automatically
CVS:
CVS: Added Files:
CVS: apaaja
CVS: ———————————————————————-
test euy

[ Wrote 7 lines ]

RCS file: /var/CVS/gorilla2/apaaja,v
done
Checking in apaaja;
/var/CVS/gorilla2/apaaja,v < -- apaaja
initial revision: 1.1
done

coder4@dev gorilla2 $ cvs -q -n up -d

cek kembali status file, karena file apaaja telah dicommit maka file apaaja di local dan di server berarti telah bersesuaian

? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c


coder4@dev admin $ cvs dif editorial.php

berfungsi untuk melakukan pembandingan file di server dan di local, di bawah ini berarrti pada local ada sytax “//komentaraja” yang baru saja ditambahkan

ndex: editorial.php
===================================================================
RCS file: /var/CVS/gorilla2/presentation/controller/admin/editorial.php,v
retrieving revision 1.3
diff -r1.3 editorial.php
26a27,28
> //komentaraja
>
32c34
< ?>
\ No newline at end of file

> ?>


coder4@dev admin $ cvs -q -n up -d

cek lagi statusnya

M editorial.php

symbol M artinya adalah modify, itu berarti ada perubahan baris atau telah dilakukan pengeditan baris

coder4@dev gorilla2 $ rm apaaja

Hapus file apaaja, lalu cek dengan syntax di bawah ini

coder4@dev gorilla2 $ cvs -q -n up -d

cvs update: warning: apaaja was lost
U apaaja
M presentation/controller/admin/editorial.php
? system/logs/g2error.log
? system/smarty/clique_fanclub/timmcgraw/templates_c


coder4@dev gorilla2 $ cvs commit apaaja

coba lakukan commit, nah di bawah ini bisa dilihat terjadi error karena file di local telah hilang sementara di server masih ada

cvs commit: Up-to-date check failed for `apaaja’
cvs [commit aborted]: correct above errors first!

coder4@dev gorilla2 $ cvs rm apaaja

melakukan penghapusan file apaaja di server

coder4@dev gorilla2 $ cvs commit apaaja

lakukan commit, dan

CVS: ———————————————————————- CVS: Enter Log. Lines beginning with `CVS:’ are removed automatically CVS: CVS: Removed Files: CVS: apaaja CVS: ———————————————————————- 7/7/2006

penghapusan telah berhasil dilakukan sehingga file apaaja telah hilang baik di local dan di server, isi directory jadi bersesuaian deh ^-^

setelah itu sedikit penjelasan tentang GREP

GREP berfungsi untuk mencari character dalam suatu directory pada linux

the syntax is grep -ir “test” namafile

so mudahkan, GANBATTE NE :D , hiks kok jadi kangen seseorang yah :-(

Komentar

Trackback: Use this URI to trackback this entry. Use your web browser's function to copy it to your blog posting.

Gravatar: You can have a picture at the top of each your comments by getting a Gravatar

Belum ada komentar.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.