Javascript required
Skip to content Skip to sidebar Skip to footer

Where Can I Find Stata in Nber Filesystem

Introduction

How much space exercise I accept gratuitous on my Linux drive?

Managing deejay space on a Linux server is an important chore. For case, package manager applications notify yous how much disk space volition be required for an installation. For that information to be meaningful, y'all should know how much space your organization has available.

In this tutorial, acquire how to use the df control to check disk space in Linux and the du command to display file arrangement disk space usage.

Tutorial on checking available disk space in Linux

Prerequisites

  • A Linux-based organisation
  • A terminal window / command line
  • A user account withsudo orroot privileges

Check Linux Disk Space Using df Command

Y'all can check your disk space simply by opening a terminal window and entering the following:

          df        
Command to check disk space on Linux.

The df command stands for disk free, and it shows you the amount of space taken up by dissimilar drives. Past default, df displays values in one-kilobyte blocks.

Display Usage in Megabytes and Gigabytes

You can display disk usage in a more human-readable format by adding the -h selection:

          df -h        

This displays the size in kilobytes (K), megabytes (M), and gigabytes (G).

Command to check disk space in human-readable format of kilobytes, megabytes,and gigabytes

Understanding the Output Format

The df command lists several columns:

          Filesystem         Size      Used     Avail    Use%    Mounted on  udev               210M        0        210M     0%       /dev  tmpfs              49M       1004K      48M      3%       /run  /dev/sda2          vii.9G       iv.3G      three.2G     58%      /        

Your output may have more entries. The columns should be self-explanatory:

  • Filesystem – This is the name of each particular bulldoze. This includes concrete hard drives, logical (partitioned) drives, and virtual or temporary drives.
  • Size The size of the filesystem.
  • Used – Amount of space used on each filesystem.
  • Avail – The corporeality of unused (free) infinite on the filesystem.
  • Employ% –Shows the per centum of the disk used.
  • Mounted on – This is the directory where the file system is located. This is also sometimes called amount signal.

The listing of filesystems includes your physical hard drive, as well as virtual hard drives:

  • /dev/sda2 – This is your concrete hard bulldoze. It may be listed as /sda1, /sda0, or you may even accept more than than ane. /dev stands fordevice.
  • udev This is a virtual directory for the/dev directory. This is function of the Linux operating arrangement.
  • tmpfs – You may have several of these. These are used by/run and other Linux processes as temporary filesystems for running the operating organisation. For example, the tmpfs /run/lock is used to createlockfiles. These are the files that prevent multiple users from irresolute the same file at the same time.

Display a Specific File Organization

The df command can be used to display a specific file arrangement:

          df -h /dev/sda2        

You tin also utilize a backslash:

          df -h /        

This displays the usage on your master difficult drive. Employ the mountain point (in the Mounted on column) to specify the bulldoze you desire to check.

Command to display the usage of a specific file system.

Note: The df control only targets a full filesystem. Fifty-fifty if you specify an individual directory, df will read the infinite of the whole drive.

Display File Systems by Type

To listing all file systems by type, use the command:

          df -ht ext4        

This lists drives with the ext4 blazon, in human-readable format.

Command to list drives with the ext4 type with size and available space show

Display Size in 1000 Instead of 1024

You can display disk usage in units of g instead of 1024:

          du -H        

This tin accost a signal of confusion in storage technology. Hard bulldoze manufacturers sell difficult drives in sizes based on g bytes = 1 kilobyte.

However, operating systems split up that space up then that 1024 bytes = one kilobyte. Because of this, a 1000-gigabyte hard drive ends upwards with roughly 930 gigabytes of usable storage.

Notation: Check out our overview of the Linux free command used to bank check total, used, shared, free, and available memory and bandy infinite.

Check Disk Infinite in Linux With du Control

The du command displays deejay usage. This tool can display disk usage for individual directories in Linux, giving you a finer-grained view of your disk usage. Apply it to display the amount of space used by your electric current directory:

          du        
Du command for displaying disk usage in Linux.

Like the df command, you tin make du human-readable:

          du -h        

It displays a listing of the contents of the current directory, and how much infinite they're using. You lot can simplify the display with the -s option:

          du -hs        

This shows how much infinite the current directory uses.

example of how much space is left in a linux directory

To specify the directory or file, cheque use the following options:

          du -hs /etc/kernel-img.conf        
          du -hs /etc        

With the second command, you may have noticed a permission denied error bulletin. This ways the electric current user doesn't have the privileges to admission certain directories. Use the sudo command to elevate your privileges:

          sudo du -hs /etc        

Annotation: If y'all're working on CentOS Linux, you lot may need to apply the su command to switch to the root user to access protected directories.

Conclusion

You should now understand how to employ df and du commands to bank check deejay space on your Linux arrangement. Remember, to display a complete list of options, use either df --assist  or du --help .

Cheque out our commodity on how to use fsck command to run a filesystem bank check equally preventive maintenance or when there is an issue with your organisation.

Was this commodity helpful?

Yes No

white-haneyyouresser1937.blogspot.com

Source: https://phoenixnap.com/kb/linux-check-disk-space