Linux 常用命令介绍
来源:互联网 发布:仿真软件multisim教程 编辑:程序博客网 时间:2024/05/16 11:55
本文主要介绍一些于实际工程中会常遇到命令。
一、Linux 查看目录或文件占用磁盘空间的大小(du)
1、可以使用 $ info du 命令查看其具体使用手册。
‘du’: Estimate file space usage。
‘du’ reports the amount of disk space used by the specified files and
for each subdirectory (of directory arguments). Synopsis:
du [OPTION]… [FILE]…
2、常用选项
2.1
‘-a’ :’–all’ Show counts for all files, not just directories.显示目录占用的磁盘空间大小,同时也显示其子目录和文件占用磁盘空间的大小。
2.2
‘-h’ :’–human-readable’ Append a size letter to each size, such as ‘M’ for mebibytes. Powers of 1024 are used, not 1000; ‘M’ stands for 1,048,576 bytes. This option is equivalent to ‘–block-size=human-readable’. Use the ‘–si’ option if you prefer powers of 1000.
以人们可读的方式显示。
2.3
‘-s’ :’–summarize’ Display only a total for each argument. 显示目录占用的磁盘空间大小,但不会显示其子目录和文件占用的磁盘空间大小。
3、常用组合
du -sh 只显示当前目录总共占的容量。
du -ah 先分别显示当前及子目录和文件的大小,最后显示总大小。
二、Linux 查看物理CPU数、逻辑CPU数、CPU信息
总核数 = 物理CPU个数 X 每个物理CPU数
1、查看物理CPU数
$ cat /proc/cpuinfo| grep “physical id”| sort| uniq| wc -l2、查看逻辑CPU数
$ cat /proc/cpuinfo| grep “processor”| wc -l3、查看每个物理CPU中core数(即核数)
$ cat /proc/cpuinfo| grep “cpu cores”| uniq4、查看CPU信息
$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
$ cat /proc/cpuinfo
http://blog.csdn.net/sycflash/article/details/6643492
- Linux常用命令介绍
- Linux常用命令介绍
- Linux常用命令介绍
- linux下常用命令介绍
- Linux常用命令介绍
- linux常用命令介绍
- Linux sysstat常用命令介绍
- Linux下常用命令介绍
- linux 常用命令介绍
- Linux常用命令 基本介绍
- linux常用命令介绍
- linux常用命令介绍
- Linux常用命令介绍
- Linux sysstat常用命令介绍
- linux常用命令介绍
- Linux常用命令介绍
- Linux常用命令介绍
- Linux常用命令介绍
- [PAT甲级]1016. Phone Bills (25)(统计用户每月电话账单)
- 【win7旗舰版64位通过硬盘安装Ubuntn16.04双系统】
- JS + HTML + JQUERY + CSS WEB前端技术积累
- Ubuntu16.04下make all编译caffe时recipe for target '.build_release/.linked' failed
- 2018远景能源笔试
- Linux 常用命令介绍
- 侧滑常用功能
- Tyvj1013
- 学习Git和GitHub最好资料,没有之一!
- 零基础学习GitHub桌面版-1 GitHub桌面版的下载安装与使用
- ROS-uvc_camera initialization problem
- 线程同步详解
- 南宁 icpc邀请赛 一记
- Oracle数据库--对数据表结构的操作