`
df is short for Disk File systems and will show the amount of disk space available for all the disk file systems mounted on the computer. Adding a file system or file systems to to df command will only show disk space information about the file systems added to the command. Disk space and be calculated in base 10 or base 2. The df command can also show information about inodes for the disk file systems.
The du command is used to show directory and file size usage. Typing du by itself will show all the directories and sub-directories of the directory you are in. Adding the -a option will also show all the files as well as directories. The du command will show how much disk space a file is using, often the file size is less than the amount of disk space used. We end the video with a look at ncdu.
In this video we start a look at the Linux directory structure. We will look at the difference between the /bin directory and the /sbin directory and what goes in the /lib directory(ies). We also look at the /ect, /home, and /usr directories as we as a few other system directories..
In this video we complete our look at the Linux directory structure. We talk about at the /mnt and /srv directories and suggest when to use one over the other. We talk about the /media and /opt directories and take a look at the /proc directory as well as other system directories..
We first look at what happens when we insert a USB drive into a Linux Mint operating system, then we manually unmount it.
We then create a new partition to manually mount that USB drive and mount the USB drive, but we cannot write to the USB drive.
We unmount the drive again and then mount it giving our user ID read/write permissions.
The last thing we do is we unmount the drive and remount it giving our user ID read/write permissions and our user group and other read only permissions.
To mount the correct hard drive at startup, we first look at how to identify the correct hard drive by using the UUID (Universally Unique Identifier).
We are going to update the /etc/fstab file to mount the USB drive on startup.
We find the UUID with the command:
ls -l /dev/disk/by-uuid
We will also need to know the file type, we find that with the command:
df -T /dev/sdc1
We then make a backup of the /etc/fstab file before making any changes to it.
We end the video looking at the different fields needed for to create an fstab record, then we create an /etc/fstab record to mount a USB drive on startup.
We look at removing, adding, and resizing partitions on a USB drive. In this video, the partition removing, adding, and resizing is all done in a GUI environment to help visualize what is being done with the partitions. In the Next video, we will do the same thing (remove, add, and resize partitions) in the command line environment.
In this video, we also take a look at the partition file system types and why you might choose one file system type over another.
We look at removing, adding, and resizing partitions on a USB drive using CLI ((The Command Line Interface)). In the previous video, we did the same thing (remove, add, and resize partitions) in a GUI environment.
We look at the parted command mklabel/mktable specifically for the msdos/mbr gpt disk partition tables.
We start off just looking at the difference between the partitions, but after that we go into a little more depth about each and boot systems they work with.
msdos/MBR works with BIOS/(Legacy Boot) and gpt works with UEFI
Then we reformat the USB drive from msdos to gpt, and create a FAT32 partition to take all the disk space on that USB drive.
We add partition labels to partitions on a USB disk. We saw that different filesystems use different label commands.
For example, We used "sudo fatlabel /dev/sdb1 PART1_FAT16" to rename our FAT16 filesystem and we used "sudo e2label /dev/sdb2 PART2_EXT4" to update an EXT4 filesystem partition.
The commands shown in the video are not the only ways to update a partition label, for example to update the EXT4 partition, we could also have used the command "sudo tune2fs /dev/sdb2 PART2_EXT4" which was not shown in the video.
We first look at how fdisk can list out what drives are on that computer, then we go into fdisk command mode for a single drive and delete partitions and change the disk label from dos to gpt. We write out those changes, then we go back in to fdisk command mode and create partitions on the new gpt disk partition table.
We look at the dd command and how it can be used to copy files or selected parts of files. We also look at how the dd command can be used to stress a single CPU and how it can be used to make files of a specific size.
We use the dd command to copy a USB drive to another USB drive of the same size. Then we copy a USB drive to a USB drive that is larger and use gparted to expand the space to use all the space on the larger drive.
We then use the dd command to make a gzip backup of a USB drive and restore from the gzip file to another USB drive.