Apri for Human Being

this is not my blog, this is my log ….

Command and Conquer: Bikin log output terminal

leave a comment »

Sebenarnya hari ini agak males nulis, soale di kantor masih pening sama banyak hal. Ada beberapa komputer bersistem operasi jendela ngambek, yang satu ga bisa ngeprint dari aplikasi, yang satu gak mau diinstall, yang satu sensitif sama file2 di NAS dan bikin beberapa file di NAS ilang satu demi satu *pasti kerjaan antivirus … sigh* terutama yang berextensi .exe …. alhasil saya mesti lagi2 download beberapa aplikasi dan driver di internet …..

Di satu sisi, sebagai IT support saya mesti support aplikasi yang padahal sama sekali saya nggak ikutan bikin, jangankan tau source kodenya, gimana manual penyelesaian klo ada masalah aja mesti meraba2 sendiri, alhasil jawaban2 setandar semacam “nanti saya teruskan ke tim developer di pusat” atau “bapak coba install ulang aplikasinya” sering meluncur dari mulut saya, apalagi klo pas lagi pening di kantor banyak tuntutan …. dan satu lagi aplikasi yang “terpaksa” mangkrak belum sempet saya terusin karena hal2 diatas tadi ….

Loh koq jadi curhat? yowes, mari keta terusken, karena hal2 diatas, makanya saya nulis tutorial yang simple2 aja yahπŸ˜€ Biasanya kalau kita ketik2 sesuatu di terminal linux setelah memasukkan suatu command pasti nongol output. Klo outputnya sebaris dua baris sih gpp lah klo commandnya banyak trus pengen kita simpen gimana? Apalagi klo bener2 di depan server yang murni CLI scroll turunin layar …. nah, ini dia solusinya:

Ada sebuah command yang bisa bikin log seperti itu, namanya $ script. Yap, dengan script kita bisa bikin log, command apa saja yang telah kita jalankan dan apa saja outputnya. Sebagai contoh ekstrem, masih ingat dengan command btool yang disertakan dalam paket barrybackup untuk membaca data di blackberry? ini buat contoh sekalian nambahin tutorial dari tulisan sebelumnya:

Misal kita ingin melihat, data apa saja yang tersimpan di Blackberry kita, buat contoh ini blackberry saya:

$ btool -t
Blackberry devices found:
Device ID: 0x85a1020. PIN: 2147****, Description: RIM BlackBerry Device
Using device (PIN): 2147****
Database database:
Database: 0x0 ‘TCP/IP Options’ (records: 1)
Database: 0x1 ‘Bluetooth Options’ (records: 1)
Database: 0x2 ‘Browser Urls’ (records: 48)
Database: 0x3 ‘Content Store’ (records: 59)
Database: 0x4 ‘PasswordKeeper Options’ (records: 1)
Database: 0x5 ‘Clock Options’ (records: 1)
Database: 0x6 ‘Folders’ (records: 30)
Database: 0x7 ‘PIM Folder List – All’ (records: 0)
Database: 0x8 ‘Trusted Key Store’ (records: 63)
Database: 0x9 ‘Default Service Selector’ (records: 3)
Database: 0xa ‘Mailbox Icon Management Options’ (records: 1)
Database: 0xb ‘WTLS Options’ (records: 1)
Database: 0xc ‘Message List Options’ (records: 1)
Database: 0xd ‘Recent Contacts’ (records: 0)
Database: 0xe ‘SheetToGoPrefs’ (records: 1)
Database: 0xf ‘Saved Email Messages’ (records: 1)
Database: 0x10 ‘Time Zones’ (records: 89)
Database: 0x11 ‘Address Book – Last Used Hints’ (records: 1)
Database: 0x12 ‘Input Learning Data’ (records: 0)
Database: 0x13 ‘Handheld Configuration’ (records: 0)
Database: 0x14 ‘AutoText Data Version’ (records: 1)
Database: 0x15 ‘DocsToGoCommonPrefs’ (records: 1)
Database: 0x16 ‘Calendar Options’ (records: 1)
Database: 0x17 ‘SMS Messages’ (records: 428)
Database: 0x18 ‘WLAN Profiles’ (records: 2)
Database: 0x19 ‘SlideshowToGoPrefs’ (records: 1)
Database: 0x1a ‘Voice Activated Dialing Options’ (records: 1)
Database: 0x1b ‘Phone Options’ (records: 1)
Database: 0x1c ‘Configuration Channel’ (records: 0)
Database: 0x1d ‘Firewall Options’ (records: 1)
Database: 0x1e ‘File Explorer Options’ (records: 1)
Database: 0x1f ‘Secure Email Decision Maker’ (records: 1)
Database: 0x20 ‘Browser Options’ (records: 1)
Database: 0x21 ‘Attachment Data’ (records: 1)
Database: 0x22 ‘Map Settings’ (records: 1)
Database: 0x23 ‘Code Module Group Properties’ (records: 83)
Database: 0x24 ‘Address Book’ (records: 652)
Database: 0x25 ‘Attachment Data – Calendar’ (records: 0)
Database: 0x26 ‘Memos’ (records: 13)
Database: 0x27 ‘Enhanced Gmail Plug-in’ (records: 1)
Database: 0x28 ‘WordToGoPrefs’ (records: 1)
Database: 0x29 ‘MemoPad Options’ (records: 1)
Database: 0x2a ‘MMS Options’ (records: 1)
Database: 0x2b ‘KeyStoreManager’ (records: 1)
Database: 0x2d ‘Tasks’ (records: 0)
Database: 0x2e ‘Tasks Options’ (records: 1)
Database: 0x30 ‘Address Book – All’ (records: 652)
Database: 0x32 ‘AutoText’ (records: 113)
Database: 0x33 ‘Device Options’ (records: 0)
Database: 0x34 ‘PasswordKeeper’ (records: 8)
Database: 0x35 ‘Calendar – All’ (records: 1)
Database: 0x36 ‘WAP Push Messages’ (records: 0)
Database: 0x37 ‘Full-predictive options’ (records: 1)
Database: 0x38 ‘PGP Key Store’ (records: 0)
Database: 0x39 ‘Map Locations’ (records: 2)
Database: 0x3a ‘Messenger Options (Yahoo!)’ (records: 1)
Database: 0x3b ‘Phone Call Logs’ (records: 38)
Database: 0x3c ‘Policy’ (records: 1)
Database: 0x3d ‘Browser Folders’ (records: 2)
Database: 0x3f ‘Camera Options’ (records: 1)
Database: 0x40 ‘MMS Messages’ (records: 0)
Database: 0x41 ‘Folder Id’ (records: 1)
Database: 0x42 ‘Random Pool’ (records: 1)
Database: 0x43 ‘Input Method Switcher Option’ (records: 1)
Database: 0x44 ‘Searches’ (records: 6)
Database: 0x45 ‘Messenger Options (GoogleTalk)’ (records: 1)
Database: 0x46 ‘Handheld Agent’ (records: 445)
Database: 0x47 ‘RMS Databases’ (records: 18)
Database: 0x48 ‘Suretype options’ (records: 1)
Database: 0x49 ‘BlackBerry Messenger’ (records: 1)
Database: 0x4a ‘Handheld Key Store’ (records: 63)
Database: 0x4b ‘Address Book Options’ (records: 1)
Database: 0x4c ‘Sounds’ (records: 16)
Database: 0x4e ‘File Explorer Network Favorites’ (records: 0)
Database: 0x4f ‘Recipient Cache’ (records: 1)
Database: 0x50 ‘Input System Properties’ (records: 1)
Database: 0x51 ‘Browser Channels’ (records: 0)
Database: 0x53 ‘Theme Settings’ (records: 1)
Database: 0x54 ‘S/MIME Options’ (records: 1)
Database: 0x55 ‘Messenger Options (WLM)’ (records: 1)
Database: 0x57 ‘Browser Push Options’ (records: 1)
Database: 0x58 ‘Messenger Options (ICQ)’ (records: 1)
Database: 0x59 ‘PIN Messages’ (records: 0)
Database: 0x5a ‘Diagnostic App Options’ (records: 1)
Database: 0x5b ‘BIS Account Data’ (records: 1)
Database: 0x5c ‘Service Book’ (records: 27)
Database: 0x5d ‘SQLite Keys’ (records: 0)
Database: 0x5e ‘VideoRecorder Options’ (records: 1)
Database: 0x5f ‘Phone History’ (records: 30)
Database: 0x60 ‘Alarm Options’ (records: 1)
Database: 0x61 ‘Spell Check Options’ (records: 1)
Database: 0x62 ‘Smart Card Options’ (records: 1)
Database: 0x63 ‘BBGroups’ (records: 12)
Database: 0x65 ‘Application Permissions’ (records: 130)
Database: 0x67 ‘File Explorer Network History’ (records: 0)
Database: 0x68 ‘Certificate Options’ (records: 0)
Database: 0x69 ‘Options’ (records: 14)
Database: 0x6a ‘Browser Bookmarks’ (records: 5)
Database: 0x6b ‘Browser Data Cache’ (records: 0)
Database: 0x6c ‘Purged Messages’ (records: 1)
Database: 0x6d ‘Certificate Summary Data’ (records: 59)
Database: 0x6f ‘Browser Messages’ (records: 0)
Database: 0x70 ‘TLS Options’ (records: 1)
Database: 0x71 ‘Messages’ (records: 1865)
Database: 0x72 ‘Quick Contacts’ (records: 2)
Database: 0x73 ‘Alarms’ (records: 3)
Database: 0x74 ‘CustomWordsCollection’ (records: 0)
Database: 0x75 ‘Profiles Options’ (records: 1)
Database: 0x76 ‘Attachment Options’ (records: 1)
Database: 0x78 ‘Memory Cleaner Options’ (records: 1)
Database: 0x79 ‘Categories’ (records: 3)
Database: 0x7a ‘Key Store Options’ (records: 1)

Nah, itu data2 yang bisa dilihat pada blackberry saya … pengen liat yang mana?πŸ˜› perintah ini sebenernya berguna klo kita pengen ngeliat nama2 yang ada di blackberry kita. Klo contoh diatas berarti kita bisa lihat di Address Book, tapi Address Book – All saya banyak banget tuh (652 records)πŸ˜€ buat contoh aja yah, kira2 perintahnya begini:

$ btool -d “Address Book – All”

Silahkan liat sendiri outputnya seperti apaπŸ˜€ nah kan gak enak tuh klo mesti scroll layar, nah mendingan kita bikin aja lognya. Perintahnya gimana? Gini:

$ script /home/apriyanto/Desktop/Address_Book.log

perintah script adalah untuk membuat log-nya sedangkan dibelakang itu adalah path dimana log tersebut disimpan dan diberi nama apa. Setelah perintah diatas dijalankan, maka setiap command dan output yang muncul diterminal akan disimpan ke file tersebut. Nah klo udah selesai bikin lognya gimana? gampang tinggal ketik perintah $exit, maka semua command dan output dibawah perintah script dan sebelum exit akan tersimpan (dalam contoh ini) di Address_Book.log.

Gampang kan? Selamat mencobaπŸ™‚

Written by apri

10 Juni 2010 pada 15:15

Ditulis dalam command & conquer, linux

Tagged with , , , , , ,

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: