Why Memory Usage is Important?

Nowadays we know the importance of open source software and their uses. Linux I also an open-source and licensed operating system. Similar to windows OS Linux also need some memory for its primary files. There are three types of memory in Linux.

► Play

  • Memory for root
  • Memory for Swap Area
  • Memory for Home Directory

The use of Linux or command line operating system in server-side is very important and almost big data centres and cloud computing is based on open-source operating systems or and software. The file management of Linux is very fast and well designed. You can check the hierarchical structure of files in Linux using “ tree ” command. You check your free and useable space in Linux using commands and also graphical user interface. In this article, I will introduce some commands with examples to check the memory space in Linux.

Check Disk Space in Linux ( Ubuntu, Fedora, Mint etc)

  • If you want to see the useable and free space in your Linux Operating System “ df ” command is very useful.
  • Linux also provides a command “ du ”to check the useable space with specific subdirectory and some important and unimportant files.
  • btrfs fi df /device/ also an important command for checking useable space based on the file system

How to Check Disk Space in Linux for Directory

df Command

The df command is the device I first used to discover drive area on Linux, way again in the Nineteen Nineties. It’s quite simple in both utilization and reporting. To at the moment, df is my go-to command for this undertaking. if you want to see the disk space ( free and usage ) space then df command is very useful. (Subcommands with df are given below).

  • df command

Above is the simple df command without any parameter.

  • df -H

df command with – H: the output of the df – H is consist of these important fields.

  • Source –> complete file system source
  • SIZE -­-> all the blocks in your memory
  •  USED –> used space of your PC
  • avail –> avail means available space on your drive
  • pcent –> pcent means per cent of your space in percentage from usage memory
  • target –> drive point

OR

du command

Our next command is du. As you might assume, that stands for disk utilization. The du command is pretty one-of-a-kind to the df command, in that it reviews on directories and no longer drives. Because of this, you’ll need to understand the names of directories to be checked. Let’s say I actually have a listing containing virtual gadget documents on my gadget.

  • du -h /your complete path

The output of the du –h command is something like this:

So ways, this command isn’t all that helpful. What if we need to realize the overall usage of a specific directory? Fortunately, du can handle that assignment.

  • du -sh /your complete path

The output of this command is:

  • du -a /your Complete path | sort -n -r | head -n 10

This command is also important for checking the memory usage in Linux.

Send us a feedback0/500

Do you like this article?
Yes
No