Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
( Diskusi + learn ) Command Line
#1
yup,,sesuai nama threadnya.. disini kita akan belajar dan berdiskusi tentang Command Line di Linux.
Memang Linux memiliki grafik yang indah, tapi seringkali kita juga berhadapan dengan command line.
Saya akan memberikan beberapa command dasar di Linux ( + turunannya Red Hat ) :

1. shutdown -> mematikan komputer ( dalam posisi root )
# shutdown
kalau mau pake timer ( disini 2 menit ) dalam mematikan komputer
# shutdown -r +2 'komputer segera dimatikan'

2. ls -> melihat isi direktori ( same like dir in windows )
$ ls

3. pwd -> Mengetahui Direktori yang aktif
$ pwd
/home/sh4d0w

4. cd -> mengubah lokasi direktori aktif
$ cd /home
pindah ke direktori home

5. mkdir -> membuat direktori Baru
$ mkdir tes

6. rmdir -> menghapus direktori
$ rmdir tes

7. cp -> mengkopi Direktori dan file
$ cp linka.mp3 /home/sh4d0w/Music

8. mv -> memindahkan file
$ mv linka.mp3 /home/sh4d0w/Music

9. rm -> menghapus File dan Direktory
$ rm linka.mp3 //menghapus file
$rm -r Hacking //menghapus direktori Hacking

10. cat -> menampilkan isi file teks
$ cat /etc/passwd

11. more -> menampilkan isi File Teks per-Halaman Layar
$ more /etc/passwd

12. less -> Perbaikan Perintah More
$ less /etc/passwd

13. Tail -> Melihat Mulai dari Baris terakhir ( EoF )
$ tail /etc/passwd

14. head -> Melihat awal baris
$ head /etc/passwd

15. find -> mencari Lokasi File
$ find / -name "pass*"

--continue
what's the death? just CTRL+X in this world and CTRL+V in another world!
Reply
#2
16. grep -> mencari Teks dalam file
$ grep 'root' /etc/passwd

17. echo -> mencetak Teks ke Layar
$ echo 'halo hacker-newbie'
halo hacker-newbie

18. > -> memasukkan teks, overwrite
$ echo 'halo hacker-newbie' > hacker.txt //akan muncul hacker.txt di direktori aktif

19. >> -> Memasukkan teks, Append
$ echo 'buahahahahaa' >> hacker.txt
$ cat hacker.txt
halo hacker-newbie
buahahahahaa

20. nano -> editor file teks. ( editor kesukaan saya )
$ nano /etc/X11/xorg.conf

21. &,jobs -> menjalankan Perintah di Background
# shutdown -r +15 &
# jobs
[1]+ Running shutdown -r +15 &

22. ps -> Melihat proses yang berjalan
$ ps
18246 pts/1 00:00:00 bash

23. kill -> Menghentikan proses
# shutdown -r +15 &
# ps -ef | grep 'shutdown'
root 20473 20448 0 02:42 pts/2 00:00:00 shutdown -r +15
#kill 20473

24. ; -> Pemisah antar perintah
$ whoami; hostname; ls -l

25. | (pipe) -> komunikasi antar proses
$ cat /etc/passwd | grep root

26. whatis -> deskripsi singkat suatu perintah
$ whatis ls

27. man -> manual dari suatu perintah ( paling sering dipakai )
$ man ls

29. rpm [parameter] -> package red hat manager
# rpm -ivh nama_aplikasi.rpm

masih banyak lagi,,ayo kalau ada yang kurang,,tambahkan yaa..
terimakasih
^^
what's the death? just CTRL+X in this world and CTRL+V in another world!
Reply
#3
nah ini dy yg aku cari...lengkap!
hhe.
btw mas,kl kompresi file di linux yg paling kuat apa ya?
soalnya ak kan download file gede nih,tp lwt bantuan webshell org,mayan speednya 10mbps,nah pas ud kdonlot,ak mw d kompres dulu filenya,trus baru download ke local.
nah kompresi apa nih yg plg bgus d linux ?
jd ntar kan misal ak donlot 500mb,trus d kompres d webshell kali aja bs jadi 50mb :P
os yg d pke webshellnya linux.
BACA INI .LIST TUTORIAL HACKING HN .GA AKAN NYESEL ..

Reply
#4
hmmm,,,kompres yang paling bisa bikin kecil itu adalah bzip2.
Ini dari contoh kasus dan perhitungan simplenya :
kita bikin
$ echo -n 'A' > a.txt
$ for i in $(seq 1 20); do echo -n 'cat a.txt' >> a.txt; done
$ ls -alh a.txt
disini kita membuat huruf A sebanyak 220 kali. maka besarnya file a.txt adalah 1048576Byte ( 1 MB )
lalu coba bandingin
$ zip a.zip a.txt
$ gzip -c a.txt >> a.txt.gz
$ bzip2 -k a.txt
lalu kita lihat isi deh,,ternyata
zip mempunyai besar 1.2K ( ga baik )
gzip 1.1K ( lumayan )
bzip2 48 ( apaa?? serius nih )
hehee,,jadi untuk kompresi file untuk mendapatkan byte sekecil mungkin bisa menggunakan kompresi bzip2, dimana kompresi bzip2 bisa mengecilkan ukuran aslinya hingga 20000 kali.
oke,,semoga membantu.
^^
what's the death? just CTRL+X in this world and CTRL+V in another world!
Reply
#5
@pak admin: ehem.. tapi itu juga tergantung dari isi file tersebut, jika file tersebut sudah terkompresi (contoh: file *.mp3), ukuran yang di peroleh ga jauh2 dari file sebelum di kompres..

jadi ga semua file bisa mendapatkan hasil tersebut..
/* There is no shortcut to be something .. */
Reply
#6
yup anda benar.. memang kalau untuk mengkompresi itu tergantung file tersebut. Tapi disini, saya ingin sharing cara kompresi melewati CLI dan kompresi mana yang paling efektif.
Terimakasih hetz96.
^^
what's the death? just CTRL+X in this world and CTRL+V in another world!
Reply
#7
nah kl file nya *.exe? apa bs d perkecil..?
sy donlot hampir 500mb,dan harapan sy sih bs diperkecil plg ga stengahnya ...

mksdnya kompresi mlewati CLI?
oh iya ,apa bzip sudah terinstall d smua jnis linux ? apa sy perlu install lg ?
soalnya kl mw install butuh root dulu ni d webshellnya hiks ...
BACA INI .LIST TUTORIAL HACKING HN .GA AKAN NYESEL ..

Reply
#8
biasanya file installer *.exe sudah terkompresi, tapi ga ada salahnya dicoba..
/* There is no shortcut to be something .. */
Reply
#9
@gt_portnoy
hmm,,coba aja bro. kebetulan saya sama sekali ga tebiasa ama windows environment.. tapi kalau kayak .RPM, .DEB bisa di extract.

maksudnya extract melalui CLI itu yang yang seperti saya tulis,, masuk ke terminal ketik :
$ command zip
kalau melalui GUI sih bisa aja,, tinggal klik kanan lalu pilih create archive.
sudah langsung terinstall di Linux kok bro. udah default packages..
met explore..
^^
what's the death? just CTRL+X in this world and CTRL+V in another world!
Reply
#10
ohh sip bang ...ntar d coba ...mslhnya kan via webshell ilegal..mw msk ke gui nya jg gmn ...hihihi...ntar ak coba deh bang ...thx ...
BACA INI .LIST TUTORIAL HACKING HN .GA AKAN NYESEL ..

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Command Dasar Backtrack justinisal 7 228 12-24-2012, 01:26 PM
Last Post: [H2]
  Command dasar Linux Dr.A 2 91 12-09-2011, 10:59 AM
Last Post: nesta
  Tips Mencari File Menggunakan Command Di Console abu adam 12 153 06-09-2011, 06:24 PM
Last Post: easy2study
  [ask] command ==> ln xnagacode 12 121 02-27-2011, 08:16 PM
Last Post: aandoni
  [ask]menambah command apt-add-repository di blankon meuligo xnagacode 3 24 11-24-2010, 10:47 AM
Last Post: xnagacode
  1000+ command line Suse Sidom 13 148 11-17-2010, 04:27 PM
Last Post: Racifa

Forum Jump:


Users browsing this thread: 3 Guest(s)