L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h


Download 7.3 Mb.
Pdf ko'rish
bet99/115
Sana27.10.2023
Hajmi7.3 Mb.
#1728481
1   ...   95   96   97   98   99   100   101   102   ...   115
Bog'liq
linuxbasicsforhackers

E XERCISES
Before you move on to Chapter 10, try out the skills you learned from this 
chapter by completing the following exercises:
1. Create three scripts to combine, similar to what we did in Chapter 8. 
Name them Linux4Hackers1Linux4Hackers2, and Linux4Hackers3.
2. Create a tarball from these three files. Name the tarball L4H. Note how the 
size of the sum of the three files changes when they are tarred together.
3. Compress the L4H tarball with gzip. Note how the size of the file changes. 
Investigate how you can control overwriting existing files. Now uncompress 
the L4H file. 
4. Repeat Exercise 3 using both bzip2 and compress.
5. Make a physical, bit-by-bit copy of one of your flash drives using the dd 
command.



10
F I L E S Y S T E M A N D S T O R A G E 
D E V I C E M A N A G E M E N T
If you are coming from a Windows envi-
ronment, the way that Linux represents 
and manages storage devices will look 
rather different to you. You’ve already seen 
that the filesystem has no physical representation of 
the drive, like the C:D:, or E: system in Windows, 
but rather has a file tree structure with / at the top, 
or root, of it. This chapter takes a look at how Linux 
represents storage devices such as hard drives, flash 
drives, and other storage devices.
We first look how additional drives and other storage devices are 
mounted upon that filesystem, leading up to the / (root) directory. 
Mounting in this context simply means attaching drives or disks to the 
filesystem to make them accessible to the operating system (OS). For you 
as a hacker, it’s necessary to understand the file and storage device manage-
ment system, both on your own system and, often, the system of your target. 


102
Chapter 10
Hackers commonly use external media to load data, hacking tools, or even 
their OS. Once you’re on your target system, you need to understand what 
you’re working with, where to find confidential or other critical files, how to 
mount a drive to the target, and whether and where you can put those files 
on your system. We cover all of these topics, plus how to manage and moni-
tor storage devices, in this chapter.
We begin with the directory known as /dev, which you’ve probably 
already noticed in the directory structure: dev is short for device, and every 
device in Linux is represented by its own file within the /dev directory. Let’s 
start out by working with /dev.

Download 7.3 Mb.

Do'stlaringiz bilan baham:
1   ...   95   96   97   98   99   100   101   102   ...   115




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