Sistem Operasi Archive, Filtering, Redirection, Networking, dll Oleh Walid Umar, S.SI
[email protected] http://walidumar.wordpress.com @walidumar
Try to type command helper before u'r ask.
# man
# command –help # whatis command
Informasi Silahkan buka aplikasi “Libreoffice writer” Dan Console terminal. Mahasiswa WAJIB melakukan dokumentasi praktikum dengan mengcapture hasil perintah untuk masing-masing slide latihan. Kerjakan latihan soal pada akhir presentasi...!!! hasil latihan di simpan dalam bentuk file PDF dengan format nama file (Nama Mahasiswa – NIM).
Archive Utility (1) Penyatuan satu atau lebih file/folder kedalam sebuah file utuh yang sering disebut archive, metode archive merupakan metode untuk menggabungkan file / folder kedalam sebuah kesatuan dengan menggunakan algoritma kompresi sehingga kapasitas sebuah file/folder yang telah dikompresi menjadi lebih kecil. Linux memiliki banyak tipe kompresi yang didukung diantaranya adalah : tar, tar.gz, zip, rar, dll
Archive Utility (2) How to make archive file : # tar mode [opsi] pathname Mode :
nb : another mode / parameter use > # man tar
Archive Utility (3) : tar Pembuatan file archive : $ touch file1 file2 file3 file4 $ tar cf filejoin.tar file* Keterangan : > c = create > f = file
Archive Utility (4) : tar Ekstrak file archive : $ tar xf filejoin.tar Keterangan : > x = ekstrak > f = file
Archive Utility (5) : tar.gz Pembuatan file archive : # tar -czf join.tar.gz file* Keterangan : > c = create > z = gzip > f = file
Archive Utility (6) : tar.gz Pembuatan file archive : # tar -xzf join.tar.gz Keterangan : > x = ekstrak > z = gzip > f = file
Archive Utility (7) : zip Pembuatan file archive : $ zip filezip file1 file2 file3 adding: file1 (stored 0%) adding: file2 (stored 0%) adding: file3 (stored 0%)
Archive Utility (8) : zip Ekstrak file archive : $ unzip filezip.zip Archive: filezip.zip extracting: file1 extracting: file2 extracting: file3
CLI : alias alias : membuat fungsi (command) pemanggilan dari sebuah perintah. Pembuatan : $ alias lihat=ls Penggunaan : $ lihat file1 file2 file3 filehtml.html Pembuatan : $ alias hapus=rm Penggunaan : $ hapus file1 Penggunaan : $ lihat file2 file3 filehtml.html
CLI : type type : menginformasikan perintah / aplikasi. $ type cat cat is /bin/cat $ type ifconfig ifconfig is /sbin/ifconfig
lokasi
sebuah
CLI : file file : menginformasi tipe dari sebuah file $ file filezip.zip filezip.zip: Zip archive data, at least v1.0 to extract $ file filetxt.txt filetxt.txt: ASCII text
# cat redirection Membaca file : # cat filetxt.txt Ini file txt broh Mengganti isi file : # cat > filetxt.txt Ini masih file1 broh [Ctrl + C] Menambahkan isi file : # cat >> filetxt.txt Ini tambahkan data untuk filetxt broh [Ctrl + C]
Power of cat (1) Membaca file : # cat filetxt.txt Ini file txt broh Mengganti isi file : # cat > filetxt.txt Ini masih file1 broh [Ctrl + C] Menambahkan isi file : # cat >> filetxt.txt Ini tambahan data untuk filetxt broh [Ctrl + C] Hasil : # cat filetxt.txt Ini masih file1 broh Ini tambahan data untuk filetxt broh
Power of cat (2) Buat 3 buah file dengan nama : 1) filesatu 2) filedua 3) filetiga Tambahkan isi dari masing-masing file : 1) filesatu : ini isi dari file satu broh 2) filedua : ini isi dari file dua broh 3) filetiga : ini isi dari file tiga broh Gabungkan ketiga file tersebut menjadi file 123 : # cat filesatu filedua filetiga > file123 Baca file123 : # cat file123 ini isi dari file satu broh ini isi dari file dua broh ini isi dari file tiga broh
Simbolisasi && Buatlah sebuah file dengan perintah #touch dan edit file tersebut dengan editor #nano. Metode 1 : # touch file1 (langkah 1) # nano file1 (langkah 2) add some text here................... .................................................
Metode 2 : # touch file1 && nano file1 (langkah1) Addsome some text here........... ...................................................
# redirection (1) Pelajari seluruh parameter fungsi yang dimiliki oleh masing-masing command dibawah melalui helpcommand (man, --help). # uniq : melakukan penyaringan value (text) yang unik # sort : mengurutkan baris value # less : membaca file dengan layar lanjutan # more : membaca file dengan layar lanjutan # grep : mencari sebuah value (text) dalam sebuah file # head : menampilkan text dari bagian atas (10 baris) # tail : menampilkan text dari bagian bawah (10 baris)
# redirection (2) # who saronde_os@saronde:~$ who saronde_os tty8 saronde_os pts/1 saronde_os pts/3 saronde_os pts/4
2014-11-02 14:11 (:0) 2014-11-02 21:29 (:0.0) 2014-11-02 23:48 (:0.0) 2014-11-02 19:33 (:0.0)
Lakukan pembelokkan output untuk command #who # who > output-who.txt # ls -l output-who.txt -rw-r--r-- 1 user group 190 Nov 2 23:49 output-who.txt
# pipeline | grep
# pipeline | sort
# pipeline | uniq
# pipeline | head
# pipeline | tail
# pipeline | more & less
> [enter] next line > [space] next page
sesi
kreatif
&
mandiri...!!!
Kerjakan challange berikut : Buka console terminal, jelaskan secara detail tentang kegunaan dari 9 perintah CLI networking, dari slide berikutnya.... Pada akhir materi, setorkan keseluruhan file yang mencakup keseluruhan slide, dalam bentuk file PDF, lengkap dengan Nama dan Nim
Networking command ? :)
route
nslookup
e t u o r e c a r t
dig
t a t nets
wget
iwlis t
ping
scp
Referensi Pustaka (1) Shoots W.E Jr.- The Linux Command Line A Complete Introduction - No_Strach_Press (2012) (2) Kelompok Studi Linux UNG, Modul Panduan penggunaan Linux “Kita bisa dengan OpenSource” (2011) (3) Kelompok Studi Linux UNG, Modul Panduan penggunaan Linux “Ayo Migrasi ke Linux” (2012) (4) Catatan group Forum diskusi Kelompok Studi Linux UNG (sosial media : http://facebook.com/groups/kslung) (2009 - 2014)
Keep study, try & learn...!!!
Next >
Storage Media ● Manajemen pemaketan ●
Sekian, Terimakasih Walid Umar, S.SI [email protected] http://walidumar.wordpress.com @walidumar