DEMOS: https://learn.cantrill.io/courses/1820301/lectures/41301327 ; https://learn.cantrill.io/courses/1820301/lectures/41301328 ; and https://learn.cantrill.io/courses/1820301/lectures/41301329
lsblk
: list block devicessudo file -s /dev/xvdf
: Attempt to read files in device /dev/xvdf
, including special files
data
SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
file
command by itself determines the type of a file and its data. The command doesn't take the file extension into account, and instead runs a series of tests to discover the type of file data.sudo mkfs -t xfs /dev/xvdf
: build an XFS file system on the device /dev/xvdf
sudo mount /dev/xvdf /ebstest
: mount FS found on device /dev/xvdf
onto directory /ebstest
df -k
: display all disk space information in kBsudo blkid
: locate/print block device attributes/etc/fstab
, is a configuration table designed to ease the burden of mounting and unmounting file systems to a machine (e.g. every time you launch/restart the system)## Example: mount an FS on an EBS volume and add a file to it
lsblk
sudo file -s /dev/xvdf
sudo mkfs -t xfs /dev/xvdf
sudo file -s /dev/xvdf
sudo mkdir /ebstest
sudo mount /dev/xvdf /ebstest
cd /ebstest
sudo nano amazingtestfile.txt
# add a message
# save and exit
ls -la