# Cheat Sheet #day67 - df

### `df` Command Cheatsheet

The `df` command in Unix-like systems is used to display information about disk space usage. It provides details on disk space usage for mounted filesystems. Here’s a quick reference guide:

#### Basic Syntax

```sh
df [OPTION]... [FILE]...
```

#### Common Options

* `-h`, `--human-readable`: Print sizes in a human-readable format (e.g., KB, MB, GB).
    
    ```sh
    df -h
    ```
    
* `-T`, `--print-type`: Print filesystem type.
    
    ```sh
    df -T
    ```
    
* `-i`, `--inodes`: Display inode usage instead of block usage.
    
    ```sh
    df -i
    ```
    
* `-a`, `--all`: Include all filesystems, including those with 0 blocks.
    
    ```sh
    df -a
    ```
    
* `-t TYPE`, `--type=TYPE`: Limit listing to filesystems of type TYPE (e.g., ext4, nfs).
    
    ```sh
    df -t ext4
    ```
    

#### Examples

1. **Display disk space usage in human-readable format:**
    
    ```sh
    df -h
    ```
    
2. **Show filesystem type along with usage:**
    
    ```sh
    df -T
    ```
    
3. **Display inode usage instead of block usage:**
    
    ```sh
    df -i
    ```
    
4. **Include all filesystems, even those with 0 blocks:**
    
    ```sh
    df -a
    ```
    
5. **Limit listing to specific filesystem type (e.g., ext4):**
    
    ```sh
    df -t ext4
    ```
    

#### Additional Information

* **Help option:**
    
    ```sh
    df --help
    ```
    
* **View manual page for** `df`:
    
    ```sh
    man df
    ```
    

The `df` command is essential for monitoring disk space usage on Unix-like systems, providing detailed information about mounted filesystems. For more detailed options and usage scenarios, refer to the `man` page or use `df --help`.
