2014年3月19日星期三

Linux Commands for Beginners lesson 15 -- du,df,free commands

 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.

没有评论:

发表评论