linux command free is used to show the RAM usage of the system. Below is an example output of the command:
$ free -m
total used free shared buffers cached
Mem: 2000 1921 78 0 6 34
-/+ buffers/cache: 1881 119
Swap: 0 0 0
The "-m" switch outputs in megabyte. So the system:
- has total RAM of 2G.
- Used 1921M, but in this Used Mem, it includes 6M as buffers and 34M for cached data.
- Absolutely free (not used by anything) memory is 78M.
- If necessary, the system can use the buffered and cached memory for other processes. Therefore, the actual used memory is "used" - "buffers" - "cached", ie. 1921 - 6 - 34 = 1881M. This is lised on the 2nd line of the output: "-/+ buffers/cache 1881 119".
- Note the "-/+ buffers/cache 1881 119" has a "-/+" at the beginning. I think "-" means what we talked about in point 4. While "+" means that the actual free memory is "free" + "buffers" + "cached" = 78 + 6 + 34 (roughly 119M). Since the system can use that 119M for other processes (at most 119M can be allocated as free memory).
相关推荐
Redirect input, output, and errors of a command or script execution to other streams Debug code with different shell debugging techniques to make your scripts bug-free Manage processes, along with the...
linux 下 operating system chapter2 projet 的代码及编译方法(含C语言代码,Makefile, report) In the module entry point, create a linked list containing five struct birthday elements. Traverse the ...
对于错误输出,可以使用`2>`单独指定错误日志文件,如`command 1> standard.output 2> standard.error`。 管道符号`|`是Shell的另一大特色,它能连接多个命令,将一个命令的输出作为另一个命令的输入,例如`command...
### Linux基础命令详解 #### 2.1 Linux常用命令 Linux作为一款强大的开源操作系统,以其卓越的稳定性和安全性著称。对于初学者来说,掌握基本的Linux命令是至关重要的。以下将详细介绍Linux基础命令,包括命令的...
本文将根据给定文件中的标题、描述和部分目录内容,详细阐述一系列Linux常用命令及其实际应用案例,帮助读者更好地理解和运用这些工具。 #### 一、登录与注销管理 - **Login**: 用于用户登录系统,接受用户名和...
### Linux常用命令手册知识点概述 #### 一、系统信息与硬件检测 - **查看系统内核版本** - `# uname -a`:显示当前系统的内核版本信息。 - `# cat /etc/SuSE-release`:获取SuSE系统的版本信息。 - `# cat /etc...
### Linux命令简写和全称知识点详解 #### su - Swithuser切换用户 - **全称**: Switch user - **用途**: 用于切换当前登录的用户。通常用于切换到具有更高权限的用户(如root)来进行系统管理任务。 - **语法**: `...
### Linux常用命令详解 Linux作为一款强大的开源操作系统,在服务器领域占据着极其重要的地位。它提供了丰富的命令行..." > output.txt` 将文本写入文件 `output.txt`。 以上介绍的命令是 Linux 用户日常工作中最常...
Who this book is for Beginning Linux and Unix system administrators who want to be in full command of their systems. Table of Contents * Hello, World! Your First Shell Program * Input, Output, and ...
掌握它们不仅可以提高工作效率,还能帮助深入理解Linux系统的内部运作。对于Linux的新手来说,熟练掌握这些基本命令是非常重要的第一步。随着经验的增长,还可以探索更多高级命令和技巧,进一步提升在Linux环境下的...
A number of scripts are explained, including one that modifies the output of the ls command. Chapter 8, Conditionals, Loops, and Arrays, describes how to use common programming constructs such as ...
This is version 4 of the Midnight Commander, a free Norton Commander Clone with many useful features. The Midnight Commander comes with mouse support on xterms and optionally on the Linux console. ...
**知识点**: 使用 `man -Tascii command > output.txt` 或 `info -o output.txt command` 来将文档保存为文本文件。 #### 19. 利用现有两个文件生成新文件 **知识点**: 使用 `cat` 命令来合并文件。 - 示例:`cat ...
- **方法**:使用`man <command> | col -b > output.txt`或`info <command> | col -b > output.txt`将输出重定向到文本文件中。 ### 19. 利用两个文件生成新文件 - **命令**:使用`cat file1 file2 > newfile`或`...
例如,`command > output.txt`会将命令的输出保存到output.txt文件中。 5. **管道(Pipeline)**:`|`符号允许将一个命令的输出作为另一个命令的输入,实现命令间的串联。 **三、Shell脚本进阶** 1. **数组**:...
本文将详细介绍一系列重要的Linux命令及其用法,帮助读者更好地理解和运用这些工具。 #### 重要命令简介 1. **管道 (|):** 这个符号用于连接两个或多个命令,前一个命令的标准输出作为后一个命令的标准输入。 - ...
Enhanced the implementation of the "serialized mode" of the interpreter (enabled via the AcpiGbl_AllMethodsSerialized flag.) When this mode is specified, instead of creating a serialization semaphore ...