- Beranda
- Komunitas
- Tech
- Linux dan OS Selain Microsoft & Mac
Basic Commands Linux : Program Kompresi File


TS
chaplinhugger
Basic Commands Linux : Program Kompresi File
[color=rgba(0, 0, 0, 0.84)]Yo guys, sekarang saya akan memberikan tutorial basic commands linux untuk program kompresi file di linux, kompresi file berguna untuk membungkus sebuah file tertentu agar file tersebut lebih kecil ukurannya.[/color]
[color=rgba(0, 0, 0, 0.84)]1 # TAR.GZ[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]Sekarang, kita mulai untuk membuat kompresi file yang berformat tar,gz yang seperti anda tahu tar.gz sering anda lihat di linux.[/color]
[color=rgba(0, 0, 0, 0.84)]<file.tar.gz> itu untuk nama output hasil kompresinya, anda bisa mengubahnya sesuai dengan yang anda inginkan.[/color]
[color=rgba(0, 0, 0, 0.84)]<fileataufolderyanginginandacompress> file atau folder target yang ingin di kompresi[/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]Next, kita coba untuk ekstrak file kompresi tar.gz[/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
[color=rgba(0, 0, 0, 0.84)]2 # TAR.BZ2[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]Kali ini kita mencoba untuk memahami lebih jauh program tar, sekarang kita membuat file tar.bz2 dengan program tar di linux[/color]
[color=rgba(0, 0, 0, 0.84)]<file.tar.bz2> ini untuk nama output hasil kompresinya, anda bisa mengubahnya sesuai keinginan anda.[/color]
[color=rgba(0, 0, 0, 0.84)]<fileataufolderyanginginandacompress> file atau folder yang ingin anda kompresi.[/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]Nah, bagaimana cara ekstrak file tar.bz2? cukup mudah, anda terus baca artikel kali ini dan pahami ya.[/color]
[color=rgba(0, 0, 0, 0.84)]3 # TAR[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]Berbeda dengan yang sebelumnya ada tar.gz dan tar.bz2, sekarang kita akan mencoba untuk kompresi file dengan format tar saja.[/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
[color=rgba(0, 0, 0, 0.84)]4 # ZIP[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]yups, pasti anda semua sudah kenal dengan file kompresi yang satu ini, sekarang kita mencoba kompresi file zip di linux.[/color]
[color=rgba(0, 0, 0, 0.84)]ini untuk compress file tertentu menjadi zip.[/color]
[color=rgba(0, 0, 0, 0.84)]sedangkan untuk compress folder.[/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]sekarang, kita coba untuk ekstrak file kompresi zip di linux.[/color]
[color=rgba(0, 0, 0, 0.84)]jika anda ingin meletakkan hasil ekstraknya ke folder tujuan anda bisa menambahkan param -d, sebagai contoh.[/color]
Sumber : Maxrooted
[color=rgba(0, 0, 0, 0.84)]1 # TAR.GZ[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]Sekarang, kita mulai untuk membuat kompresi file yang berformat tar,gz yang seperti anda tahu tar.gz sering anda lihat di linux.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -czvf <file.tar.gz> <fileataufolderyanginginandacompress>[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]<file.tar.gz> itu untuk nama output hasil kompresinya, anda bisa mengubahnya sesuai dengan yang anda inginkan.[/color]
[color=rgba(0, 0, 0, 0.84)]<fileataufolderyanginginandacompress> file atau folder target yang ingin di kompresi[/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -czvf fileku.tar.gz folder1/[/font][/size][/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -czvf fileku.tar.gz file1 file2[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]Next, kita coba untuk ekstrak file kompresi tar.gz[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -xzvf <file.tar.gz>[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -xzvf fileku.tar.gz[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]2 # TAR.BZ2[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]Kali ini kita mencoba untuk memahami lebih jauh program tar, sekarang kita membuat file tar.bz2 dengan program tar di linux[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -cjvf <file.tar.bz2> <fileataufolderyanginginandacompress>[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]<file.tar.bz2> ini untuk nama output hasil kompresinya, anda bisa mengubahnya sesuai keinginan anda.[/color]
[color=rgba(0, 0, 0, 0.84)]<fileataufolderyanginginandacompress> file atau folder yang ingin anda kompresi.[/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -cjvf fileku.tar.bz2 filetujuan1[/font][/size][/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -cjvf fileku.tar.bz2 foldertujuan/[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]Nah, bagaimana cara ekstrak file tar.bz2? cukup mudah, anda terus baca artikel kali ini dan pahami ya.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -xjvf fileku.tar.bz2[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]3 # TAR[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]Berbeda dengan yang sebelumnya ada tar.gz dan tar.bz2, sekarang kita akan mencoba untuk kompresi file dengan format tar saja.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -cvf <file.tar> <fileataufolderyangingindicompress>[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -cvf fileku.tar file1.py[/font][/size][/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -cvf fileku.tar folderku/[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -xvf <file.tar>[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Sebagai Contoh :[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ tar -xvf fileku.tar[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]4 # ZIP[/color]
[color=rgba(0, 0, 0, 0.84)]Kompresi ![/color]
[color=rgba(0, 0, 0, 0.84)]yups, pasti anda semua sudah kenal dengan file kompresi yang satu ini, sekarang kita mencoba kompresi file zip di linux.[/color]
[color=rgba(0, 0, 0, 0.84)]ini untuk compress file tertentu menjadi zip.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ zip <fileoutput.zip> file1[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]sedangkan untuk compress folder.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ zip -r <fileoutput.zip> folder1/[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]Ekstrak ![/color]
[color=rgba(0, 0, 0, 0.84)]sekarang, kita coba untuk ekstrak file kompresi zip di linux.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ unzip <filetarget.zip>[/font][/size][/color]
[color=rgba(0, 0, 0, 0.84)]jika anda ingin meletakkan hasil ekstraknya ke folder tujuan anda bisa menambahkan param -d, sebagai contoh.[/color]
Code:
[color=rgba(0, 0, 0, 0.84)][size=4][font=Menlo, Monaco, "Courier New", Courier, monospace]$ unzip <filetarget.zip> -d <foldertujuan>[/font][/size][/color]
Sumber : Maxrooted


tata604 memberi reputasi
1
772
2
Thread Digembok
Urutan
Terbaru
Terlama
Thread Digembok
Komunitas Pilihan