Tag

, ,


Tux, the Linux penguin

Tux, the Linux penguin (Photo credit: Wikipedia)

Bismillah… mengawali bulan ini dengan sebuah tulisan tentang Linux….

Kenapa aku menggunakan Linux…. ini hanya penilaian objektif dari keseharianku yang bekerja mencari rizki menggunakan OS Linux…. There is more better example than this one out there. Berharap sopo tau nanti antah dimana ada orang yang dapet hidayah untuk menggunakan linux setelah membaca  ini…😀

Linux itu enak, karena bisa buat.

  • ngedownload ratusan bahkan ribuan file bisa dengan satu perintah saja….
$ wget -r blh blah blah... #atau resep-resep downoad lainnya....
  • rename banyak file sekaligus, bisa dalam hitungan detik dan bisa dengan satu baris perintah saja….
[koro@kuma t]$ ls
backgroundlabs_50.gif  backgroundlabs_65.gif  backgroundlabs_75.gif  backgroundlabs_90.gif
[koro@kuma t]$ for i in *.gif; do mv "$i" "`basename $i .gif`.GIF"; done
[koro@kuma t]$ ls
backgroundlabs_50.GIF  backgroundlabs_65.GIF  backgroundlabs_75.GIF  backgroundlabs_90.GIF
  • atau
[koro@kuma bash]$ ls
backgroundlabs_103.GIF  backgroundlabs_224.GIF  backgroundlabs_334.GIF  backgroundlabs_437.GIF
...
[koro@kuma bash]$ for file in *.GIF; do mv $file `basename $file .GIF| cut -c16-`.gif; done
[koro@kuma bash]$ ls
103.gif  152.gif  193.gif  230.gif  263.gif  305.gif  351.gif  390.gif  432.gif  456.gif  69.gif
....
  • bikin direktory/folder banyak sekaligus dalam satu perintah dan dalam hitungan detik, gak jadi masalah…
[koro@kuma bash]$ mkdir -p {a/{A..Z}/{01..10},b/{a,b,c,d}}
[koro@kuma bash]$ tree
.
├── a
│   ├── A
│   │   ├── 01
│   │   ├── 02
│   │   ├── 03
│   │   ├── 04
│   │   ├── 05
│   │   ├── 06
│   │   ├── 07
│   │   ├── 08
│   │   ├── 09
│   │   └── 10
│   ├── B
│   │   ├── 01
│   │   ├── 02
..... #dipotong karena kebanyakan.... ^^v
│   └── Z
│       ├── 01
│       ├── 02
│       ├── 03
│       ├── 04
│       ├── 05
│       ├── 06
│       ├── 07
│       ├── 08
│       ├── 09
│       └── 10
└── b
    ├── a
    ├── b
    ├── c
    └── d

292 directories, 0 files
[koro@kuma bash]$
  • split file dan unsplit file dengan cara yang sangat gampang…..
    split:
[koro@kuma bash]$ ls -lh
total 12M
-rw-r--r-- 1 koro root 418M May 31 23:35 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv
[koro@kuma bash]$ split -n 10 -d \[gg\]_EUREKA_SEVEN_AO_-_07_\[68D14AE3\].mkv \[gg\]_EUREKA_SEVEN_AO_-_07_\[68D14AE3\].mkv_
[koro@kuma bash]$ ls -lh
total 430M
-rw-r--r-- 1 koro root 418M May 31 23:35 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_00
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_01
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_02
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_03
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_04
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_05
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_06
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_07
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_08
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_09
[koro@kuma bash]$ 

#Oke, tinggal upload.... :D

unsplit:

[koro@kuma bash]$ cat \[gg\]_EUREKA_SEVEN_AO_-_07_\[68D14AE3\].mkv_0* >EUREKA_SEVEN_AO_-_07\(unsplit\).mkv
[koro@kuma bash]$ ls -lh
total 848M
-rw-r--r-- 1 koro root 418M May 31 23:38 EUREKA_SEVEN_AO_-_07(unsplit).mkv
-rw-r--r-- 1 koro root 418M May 31 23:35 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_00
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_01
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_02
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_03
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_04
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_05
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_06
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_07
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_08
-rw-r--r-- 1 koro root  42M May 31 23:36 [gg]_EUREKA_SEVEN_AO_-_07_[68D14AE3].mkv_09
[koro@kuma bash]$ diff \[gg\]_EUREKA_SEVEN_AO_-_07_\[68D14AE3\].mkv EUREKA_SEVEN_AO_-_07\(unsplit\).mkv 
[koro@kuma bash]$ 
# berarti file identik,,, tinggal play... :D
  • bikin arsip, dari satu direktory dengan menentukan file apa saja yang boleh diarsipkan dan file apa saja yang gak boleh di arsipkan bisa dalam hitungan detik dan cukup dengan satu baris perintah saja….
[koro@kuma bash]$ ls 
backgroundlabs_100.jpg  backgroundlabs_210.jpg  backgroundlabs_320.jpg  backgroundlabs_430.gif
backgroundlabs_101.jpg  backgroundlabs_211.jpg  backgroundlabs_321.jpg  backgroundlabs_431.gif
backgroundlabs_102.jpg  backgroundlabs_212.jpg  backgroundlabs_322.jpg  backgroundlabs_432.gif
backgroundlabs_103.gif  backgroundlabs_213.jpg  backgroundlabs_323.jpg  backgroundlabs_433.gif
backgroundlabs_104.jpg  backgroundlabs_214.gif  backgroundlabs_324.gif  backgroundlabs_434.gif
backgroundlabs_105.gif  backgroundlabs_215.gif  backgroundlabs_325.jpg  backgroundlabs_435.gif
backgroundlabs_106.jpg  backgroundlabs_216.jpg  backgroundlabs_326.gif  backgroundlabs_436.gif
backgroundlabs_107.jpg  backgroundlabs_217.jpg  backgroundlabs_327.gif  backgroundlabs_437.gif
backgroundlabs_108.jpg  backgroundlabs_218.jpg  backgroundlabs_328.gif  backgroundlabs_438.gif
backgroundlabs_109.jpg  backgroundlabs_219.jpg  backgroundlabs_329.jpg  backgroundlabs_439.gif
backgroundlabs_10.jpg   backgroundlabs_21.jpg   backgroundlabs_32.gif   backgroundlabs_43.gif
...
[koro@kuma bash]$ zip file.zip ./* -x *.gif -x *.png -x get*
  adding: backgroundlabs_100.jpg (deflated 2%)
  adding: backgroundlabs_101.jpg (deflated 2%)
  adding: backgroundlabs_102.jpg (deflated 11%)
  adding: backgroundlabs_104.jpg (deflated 7%)         #file backgroundlabs_103.gif gak dimasukkan dalam arsip
  adding: backgroundlabs_106.jpg (deflated 5%)
  adding: backgroundlabs_107.jpg (deflated 0%)
  adding: backgroundlabs_108.jpg (deflated 0%)
  adding: backgroundlabs_109.jpg (deflated 0%)
  adding: backgroundlabs_10.jpg (deflated 1%)
...
[koro@kuma bash]$ ls
...
backgroundlabs_206.gif  backgroundlabs_317.jpg  backgroundlabs_428.jpg  file.zip
...
  • bikin multiple arsip dari multiple file/direktory cukup dengan beberapa baris perintah saja (bahkan bisa dibuat jadi satu baris dan tersusun dari gak lebih dari 100 biji karakter)….
[koro@kuma bash]$ ls
backgroundlabs_418.png  backgroundlabs_473.png  backgroundlabs_479.png  backgroundlabs_484.png
backgroundlabs_419.png  backgroundlabs_474.png  backgroundlabs_480.png  backgroundlabs_485.png
backgroundlabs_427.png  backgroundlabs_475.png  backgroundlabs_481.png  get.sh
backgroundlabs_453.png  backgroundlabs_476.png  backgroundlabs_482.png  get.sh~
backgroundlabs_472.png  backgroundlabs_477.png  backgroundlabs_483.png
[koro@kuma bash]$ for F in *.png; do zip `basename $F .png`.zip $F; done              # cuma 54 karakter :p
  adding: backgroundlabs_418.png (deflated 37%)
  adding: backgroundlabs_419.png (deflated 38%)
  adding: backgroundlabs_427.png (deflated 38%)
  adding: backgroundlabs_453.png (deflated 37%)
  adding: backgroundlabs_472.png (deflated 14%)
  adding: backgroundlabs_473.png (deflated 6%)
  adding: backgroundlabs_474.png (deflated 4%)
  adding: backgroundlabs_475.png (deflated 2%)
  adding: backgroundlabs_476.png (deflated 19%)
  adding: backgroundlabs_477.png (deflated 2%)
  adding: backgroundlabs_479.png (deflated 0%)
  adding: backgroundlabs_480.png (deflated 1%)
  adding: backgroundlabs_481.png (deflated 0%)
  adding: backgroundlabs_482.png (deflated 37%)
  adding: backgroundlabs_483.png (deflated 38%)
  adding: backgroundlabs_484.png (deflated 1%)
  adding: backgroundlabs_485.png (deflated 1%)
[koro@kuma bash]$ ls
backgroundlabs_418.png  backgroundlabs_472.zip  backgroundlabs_477.png  backgroundlabs_482.zip
backgroundlabs_418.zip  backgroundlabs_473.png  backgroundlabs_477.zip  backgroundlabs_483.png
backgroundlabs_419.png  backgroundlabs_473.zip  backgroundlabs_479.png  backgroundlabs_483.zip
backgroundlabs_419.zip  backgroundlabs_474.png  backgroundlabs_479.zip  backgroundlabs_484.png
backgroundlabs_427.png  backgroundlabs_474.zip  backgroundlabs_480.png  backgroundlabs_484.zip
backgroundlabs_427.zip  backgroundlabs_475.png  backgroundlabs_480.zip  backgroundlabs_485.png
backgroundlabs_453.png  backgroundlabs_475.zip  backgroundlabs_481.png  backgroundlabs_485.zip
backgroundlabs_453.zip  backgroundlabs_476.png  backgroundlabs_481.zip  get.sh
backgroundlabs_472.png  backgroundlabs_476.zip  backgroundlabs_482.png  get.sh~
[koro@kuma bash]$
  • convert dan resize ratusan bahkan jutaan file gambar dari format tertentu ke format lain cukup dengan satu perintah….. (jangan khawatir, file tidak akan di overwrite -kalo perintahnya gak salah)
[koro@kuma bash]$ ls
backgroundlabs_418.png  backgroundlabs_473.png  backgroundlabs_479.png  backgroundlabs_484.png
backgroundlabs_419.png  backgroundlabs_474.png  backgroundlabs_480.png  backgroundlabs_485.png
backgroundlabs_427.png  backgroundlabs_475.png  backgroundlabs_481.png  get.sh
backgroundlabs_453.png  backgroundlabs_476.png  backgroundlabs_482.png  get.sh~
backgroundlabs_472.png  backgroundlabs_477.png  backgroundlabs_483.png
[koro@kuma bash]$ mogrify -format jpg *.png
[koro@kuma bash]$ ls
backgroundlabs_418.jpg  backgroundlabs_472.png  backgroundlabs_477.jpg  backgroundlabs_482.png
backgroundlabs_418.png  backgroundlabs_473.jpg  backgroundlabs_477.png  backgroundlabs_483.jpg
backgroundlabs_419.jpg  backgroundlabs_473.png  backgroundlabs_479.jpg  backgroundlabs_483.png
backgroundlabs_419.png  backgroundlabs_474.jpg  backgroundlabs_479.png  backgroundlabs_484.jpg
backgroundlabs_427.jpg  backgroundlabs_474.png  backgroundlabs_480.jpg  backgroundlabs_484.png
backgroundlabs_427.png  backgroundlabs_475.jpg  backgroundlabs_480.png  backgroundlabs_485.jpg
backgroundlabs_453.jpg  backgroundlabs_475.png  backgroundlabs_481.jpg  backgroundlabs_485.png
backgroundlabs_453.png  backgroundlabs_476.jpg  backgroundlabs_481.png  get.sh
backgroundlabs_472.jpg  backgroundlabs_476.png  backgroundlabs_482.jpg  get.sh~
  • Coding, push repo, pull prom repo dan semua fasilitas sharing kode lainnya sangat mudah didapatkan….
[koro@kuma getgit]$ svn checkout http://smooth-wheel.googlecode.com/svn/trunk/ smooth-wheel-read-only
[koro@kuma getgit]$ hg clone https://code.google.com/p/android-ui-utils/
[koro@kuma getgit]$ git clone https://code.google.com/p/android-multitouch-controller/

#### upload ke repo
[koro@kuma Ankabut]$ git remote add origin https://code.google.com/p/ankabut/
##sample commit ke dua server repo git berbeda..
[koro@kuma Ankabut]$ git commit -m "Update aplikasi super canggih... :p"
[master b8f285b] Update aplikasi super canggih... :p
 16 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 README
....
[koro@kuma Ankabut]$ git push origin master
Counting objects: 52, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (31/31), 766.29 KiB, done.
Total 31 (delta 10), reused 0 (delta 0)
remote: Scanning pack: 100% (31/31), done.
remote: Storing objects: 100% (31/31), done.
remote: Processing commits: 100% (1/1), done.
To https://code.google.com/p/ankabut/
   3c184ab..b8f285b  master -> master
[koro@kuma Ankabut]$ git push
Counting objects: 52, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (31/31), 766.20 KiB, done.
Total 31 (delta 10), reused 0 (delta 0)
To git@github.com:baka-hayi/Ankabut.git
   3c184ab..b8f285b  master -> master
[koro@kuma Ankabut]$
  • otomatisasi kerjaan bisa sangat mudah….
  • backup system gampang….. cukup copy n paste….
#!/bin/sh
# kalo ini pake rsync d shell script
# rsync backup script

rsync -av ssh --progress --delete-excluded --exclude-from=backup.lst / $1

atau kalo pake cp

cp -a /yang/mau/dibackup /target/tujuan/backup

Serta masih banyak lagi keuntungan dan kelebihan menggunakan Linux yang tidak dapat diungkapkan dengan kata-kata….

Hanya yang bisa tak katakan cuma:

Linux is better than … ehm… you know right??

dan satu hal yang sangat prinsip yang membuatku tetap dan akan selalu menggunakan Linux,

Linux dan sebagian besar aplikasi-aplikasinya gratis dan Hallal untuk digunakan, dikembangkan, dan didistribusikan….

tapi OS yang satu itu “is better than Linux in Game….. :p” #I guarantee it….

CATATAN: gunakan semua peintah yang ada di sini dengan resiko anda sendiri…. penulis tidak betanggung jawab atas segala ketagihan dan kemudahan yang anda dapatkan setelah mencoba perintah-perintah yang termaktub di atas….