Linux Commands for Beginners--Viewing Resources--du,df,free commands

本文详细介绍了 Linux 中用于查看系统资源的 df、du 和 free 命令,包括它们的功能、用法及实例演示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    In this part, I talk about viewing system resources.


1.COMMAND :
       df 
DESCRIPTON :
       report file system disk space usage
SYNOPSIS :
       df [OPTION]... [FILE]...
OPTION :
      -h, --human-readable
Example :
[piniheaven@localhost ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1               15G  5.4G  9.0G  38% /
tmpfs                      2.8G  884K  2.8G   1% /dev/shm




2.COMMAND :
     du
DESCRIPTION :
     estimate file space 
SYNOPSIS :
     du [OPTION]... [FILE]...
OPTION :
     -s, --summarize
              display only a total for each argument
     -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) 
Example :
[piniheaven@localhost ~]$ ls
Desktop            Documents  Music     Public        SolftWare  tutorial
distribute-0.6.49  Downloads  Pictures  Python-2.7.3  Templates  Videos
[piniheaven@localhost ~]$ du -sh Videos
254MVideos




3.COMMAND :
      free 
DESCRIPTION :
      Display amount of free and used memory in the system
SYNOPSIS :
       free [-m] 
OPTION :
      -m switch displays it in megabytmegabytes.  
Example :
[piniheaven@localhost ~]$ free-m
             total       used       free     shared    buffers     cached
Mem:          5690       1736       3953          0         74        615
-/+ buffers/cache:       1046       4644
Swap:            0          0          0
Explanation:
Actual Used Physical Memory (Memory Used by Apps) :1046 MB
Actual Free Physical Memory (Memory Available For Apps) :4644 MB


If you want to know more about what is the difference between buffer and cache memory,you can click following link.

buffer&cache


inux for Beginners doesn't make any assumptions about your background or knowledge of Linux. You need no prior knowledge to benefit from this book. You will be guided step by step using a logical and systematic approach. As new concepts, commands, or jargon are encountered they are explained in plain language, making it easy for anyone to understand. Here is what you will learn by reading Linux for Beginners: How to get access to a Linux server if you don't already. What a Linux distribution is and which one to choose. What software is needed to connect to Linux from Mac and Windows computers. Screenshots included. What SSH is and how to use it, including creating and using SSH keys. The file system layout of Linux systems and where to find programs, configurations, and documentation. The basic Linux commands you'll use most often. Creating, renaming, moving, and deleting directories. Listing, reading, creating, editing, copying, and deleting files. Exactly how permissions work and how to decipher the most cryptic Linux permissions with ease. How to use the nano, vi, and emacs editors. Two methods to search for files and directories. How to compare the contents of files. What pipes are, why they are useful, and how to use them. How to compress files to save space and make transferring data easy. How and why to redirect input and output from applications. How to customize your shell prompt. How to be efficient at the command line by using aliases, tab completion, and your shell history. How to schedule and automate jobs using cron. How to switch users and run processes as others. Where to go for even more in-depth coverage on each topic. What you learn in "Linux for Beginners" applies to any Linux environment including Ubuntu, Debian, Linux Mint, RedHat, Fedora, OpenSUSE, Slackware, and more.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值