Home

How do you fix du error codes?

Alton Alexander
By Alton AlexanderUpdated on June 4th, 2022

Du error codes are error codes that are displayed when an error occurs while trying to access a file or folder. This error code can happen for a number of reasons, such as if the file or folder does not exist, if the user does not have permission to access the file or folder, or if the file or folder is corrupted.

You are here because you have a question about:

  • du error code 14
  • du error codes

1. Check for available disk space with the command `df -h`

The df command prints usage and exit information. The following is a brief description of the command's options: -h: This option prints the help text for df. -t: This flag specifies that df prints the total disk space in bytes. -a: This flag specifies that df prints the available disk space in bytes. The df command can be used to check the available disk space on a local disk, or on a remote disk that is attached to the system. The following example checks the disk space on the local disk C: df -h Output: Usage: df [options] [files]... Options: -h: This option prints the help text for df. -t: This flag specifies that df prints the total disk space in bytes. -a: This flag specifies that df prints the available disk space in bytes.

2. Use the `du` command with the `-h` option to see disk usage in a human-readable format

The du command prints the disk usage of a file or directory in a human-readable format. To use the du command with the -h option, you can specify the size of the output in kilobytes (KB), megabytes (MB), or gigabytes (GB). The following example prints the disk usage of the file myfile.txt in KB, MB, and GB format: du -h myfile.txt

3. Use the `du` command with the `-c` option to see a grand total of disk usage

To see a grand total of disk usage on your system, use the du command with the -c option. For example, du -c / | grep '/' will show you the total amount of disk space used by each directory in your system, including the / directory itself. If you receive an error code when running the du command, you can use the du -hs command to see a more detailed summary of the disk space used by each file or directory.

4. Use the `du` command with the `-s` option to see only a summary of disk usage

The du command can be used to show a summary of disk usage. The -s option can be used to show only a summary of disk usage. This option displays a list of files and folders and the amount of space they occupy on the disk. The -h option can be used to show the size of each file and the total size of the disk.

5. Use the `du` command with the `-x` option to exclude mount points from the disk usage calculation

The du command can be used to display disk usage on a system. To exclude certain mount points from the disk usage calculation, use the -x option. For example, to calculate disk usage for the /home directory only, use the following command: du -x /home If the command is run with the -h option, du will also display the size of each file and directory in the input directory.

Some users might also have success with the following opitons:

  1. Use the du command with the --max-depth option to limit the depth of the directory tree that is traversed.
  2. Use the du command with the --exclude option to exclude specific files or directories from the disk usage calculation.