Linux Basics for Hackers



Download 1,43 Mb.
bet3/18
Sana22.08.2022
Hajmi1,43 Mb.
#847523
1   2   3   4   5   6   7   8   9   ...   18
Bog'liq
(2)Linux Basics For Aspiring Hackers 2018

Compressing Files


Now we have one archived file, but that file is bigger than the sum of the original files. What if you want to compress those files for ease of transport? Linux has several commands capable of creating compressed files. We will look at these:

gzip, which uses the extension .tar.gz or .tgz bzip2, which uses the extension .tar.bz2 compress, which uses the extension .tar.z These all are capable of compressing our files, but they use different compression algorithms and have different compression ratios. Therefore, we’ll look at each one and what it’s capable of.
In general, compress is the fastest, but the resultant files are larger; bzip2 is the slowest, but the resultant files are the smallest; and gzip falls somewhere in between. The main reason you, as a budding hacker, should know all three methods is that when accessing other tools, you will run into various types of compression. Therefore, this section shows you how to deal with the main methods of compression.

Compressing with gzip


Let’s try gzip (GNU zip) first, as it is the most commonly used compression utility in Linux. You can compress your HackersArise.tar file by entering the following (making sure you’re in the directory that holds the archived file):

kali >gzip HackersArise.*

Notice that we used the wildcard * for the file extension; this tells
Linux that the command should apply to any file that begins with HackersArise with any file extension. You will use similar notation for the following examples. When we do a long listing on the directory, we can see that HackersArise.tar has been replaced by HackersArise.tar.gz, and the file size has been compressed to just 3,299 bytes!

kali >ls -l
--snip--
-rw-r--r-- 1 root root 3299 Nov 27 2018 13:32 HackersArise.tar.gz
--snip--

We can then decompress that same file by using the gunzip command, short for GNU unzip.

kali >gunzip HackersArise.*

Once uncompressed, the file is no longer saved with the .tar.gz extension but with the .tar extension instead. Also, notice that it has returned to its original size of 40,960 bytes. Try doing a long list to confirm this. It’s worth noting that gzip can also be used to extract .zip files.

Download 1,43 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   18




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish