一. Linux 常用命令总结
1. linux 基础命令
who, which, basename, dirname, echo, type, hash, whatis, makewhatis, man, info, help, ls, cd,pwd, mkdir, rmdir, touch, rm, date, hwcolck, cal, shutdown, reboot, tty
1 who : Show who is logged on, print information about users who are currently logged in.
显示登录的用户。
2 which : Show the full path of (shell) commands
which pwd, which shutdown
3 basename : Print name with any leading directory components removed.
basename /usr/bin/sort , Output: sort
4 dirname : strip non-directory suffix from file name
dirname /usr/bin/sort , Output: /usr/bin
5 命令替换
‘ ’ :强引用,变量不会替换;
“ ” :若引用,变量可以替换;
` ` :命令应用,类似$()
6 echo : display a line of text , 回显
echo $PATH , Output: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
echo '$PATH' , Output: $PATH
echo "zhu biao" , Output: zhu biao
echo `date +%F`(echo $(date +%F)) , Output: 2016-10-26
7 type : Display information about command type
type cd , Output: cd is a shell builtin
type shutdown , Output: shutdown is /sbin/shutdown, 若shutdown已经执行过,将会添加到hash数据库,则:shutdown is hashed (/sbin/shutdown)
8 hash : Rember or display program loacations, 显示hash数据库,执行过的程序次数、位置。
9 whatis : 简洁描述某个命令的功能,该命令在manual文档中的章节
whatis shutdown , Output:
shutdown (2) - shut down part of a full-duplex connection
shutdown (3p) - shut down socket send and receive operations
shutdown (8) - bring the system down
10 makewhatis : Create the whatis datebase
11 shell command 分为内部命令和外部命令
内部命令帮助:help command
外部命令帮助:command --help, man command, info command
12 man : man [section] command , manual , 命令,配置文件格式,库调用等帮助文档
[section]:
1: User Commands
2: System Calls
3: C Library Functions
4: Devices and Special Files
5: File Formats and Conventions
6: Games et. Al.
7: Miscellanea
8: System Administrations tools and Deamons
13 info : 获取在线帮助文档,使用方法类似man
14 help : shell内部命令帮助文档
help ls
15 {a,b} : 可展开
{a,b}/{x,y} : a/x a/y b/x b/y
{a,b}-heburn-{x,y} : a-heburn-x a-heburn-y b-heburn-x b-heburn-y
16 ls : list directory contents
ls /home/zhubiao
17 cd : change the shell working directory
cd /home/zhubiao
cd ~ : 回到用户家目录
cd ~zhubiao : 回到用户zhubiao家目录
cd - : 回到上一个目录
18 pwd : Print working directory
19 mkdir : make directories
Create directories /mnt/linux/bin, /mnt/linux/sbin, /mnt/bin, /mnt/sbin 可用如下命令:
mkdir -pv /mnt{/linux/{bin/sbin},bin,sbin}
20 rmdir : remove empty diretories
rmdir /mnt
rmdir -p /a/b
21 rm : remove files or directories
rm -rf /a/b/zhubiao
22 touch : 创建文件
23 date : print or set the system date and time
date [MMDDhhmm[[CC]YY][.ss] :
date 10262318 设定系统时间为10月26日 23:18,
date 102623182016.33 设定系统时间为 2016-10-26 23:18:33
date +%F , Output: 2016-10-26
date +%T , Output: 23:18:33
-s : --set "CCYY-MM-DD hh:mm:ss"
24 hwclock : query or set the hadway clock (RTC)
hwclock --set --date="2016-10-10 23:12:10"
hwclock -s(--hctosys)
hwclock -w(--systohc)
25 cal : Display a calendar
cal , Output:
October 2016
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
26 shutdown : bring the system down
shutdown -h now
shutdown -r +5
27 reboot : reboot, halt, poweroff - reboot or stop the system
28 ternial
a.虚拟终端 tty#
b.物理终端 console
c.伪终端 pts/#
一. Linux 常用命令总结的更多相关文章
- Linux常用命令(一)
Linux常用命令 1. pwd查看当前路径(Print Working Directory) [root@CentOS ~]# pwd/root 2. cd .. 返回上一级 .. 表示上一级 ...
- linux常用命令的介绍
本文主要介绍Linux常用命令工具,比如用户创建,删除,文件管理,常见的网络命令等 如何创建账号: 1. 创建用户 useradd -m username -m 表示会在/home 路径下添加创建用户 ...
- linux——常用命令与脚本
linux常用命令 --文件管理pwd --查看当前目录cd --切换当前目录ls --列出当前目录下的所有文件touch --创建文件mkdir --建立目录rmdir --删除空目录rm --删除 ...
- DOS 和 Linux 常用命令的对比
DOS 和 Linux 常用命令的对比 许多在 shell 提示下键入的 Linux命令都与你在 DOS 下键入的命令相似.事实上,某些命令完全相同. 本附录提供了 Windows的 DOS 提示下的 ...
- 第一章,Linux常用命令
20161124 Linux常用命令1.find find /etc/ -size +50k -lsfind /etc/ -size +50k -ls 2> /dev/null查看目录下大于50 ...
- linux 常用命令大全
linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...
- Linux 常用命令行
Linux常用命令行 第一部分: cd命令 第二部分:文件操作 第三部分:压缩包操作
- [工作需求]linux常用命令以及vim常用命令
一. Linux 常用命令 mkdir dirname新建文件夹 cd ~ 进入自己的家目录 cd dirname 进入名字为dirname的目录: l 显示当前文件夹下的文件 ...
- 对于我的linux常用命令的说明
我所列出的linux常用命令中的选项并不是全部的选项,是一些我们经常用到的linux命令及选项
- Linux 常用命令笔记
Linux 常用命令笔记 1. locate locate:用来定位文件的位置,如:locate a.txt 但是这个命令有延迟,也就是新建的文件不一定能搜索到,如果非要找到新建的文件可以使用 upd ...
随机推荐
- ADO.NET---ExcuteScalar()方法复习
ExcuteScalar(),返回的是查询结果的第一行第一列,返回值是object类型,一般用来查询表中有多少条数据,求最大值等 现在我们用ExcuteScalar()做个测试,需求:我要查询学生表里 ...
- Winform开发框架之客户关系管理系统(CRM)的开发总结系列1-界面功能展示
一直以来,都希望整合一个以客户为中心的平台,有两个方面的考虑:一是实现客户数据.客户关系.客户管理等方面的整合,以便更好利用好客户的相关资源,发挥最大的营销效益:二是整合目前我的开发框架的所有模块和技 ...
- Azure开发者任务之六:使用WCF Service Web Role
在本文中,我们将会在local development fabric上创建一个WCF服务角色,然后在一个控制台应用程序中使用它. WCF服务角色可以让我们创建一个WCF服务,并且把它托管在Window ...
- java设计模式--工厂模式
所谓工厂,就是要造产品,比如一个小型砖瓦厂,只有一个窑,既能造砖又能造瓦,这种叫简单工厂模式.规模稍大一点呢,我多个窑,有的窑专门造砖,有的窑专门造瓦,想造别的,比如瓷砖,我再用个专门的窑,这种 ...
- 百度FIS入门
1.fis作为nodejs的模块来管理的,所以首先得安装nodejs,看我前面的安装nodejs的文章. 2.官方的案例下载包https://github.com/hefangshi/fis-quic ...
- [PE结构分析] 7.相对虚拟地址(RVA)和文件偏移间的转换
RVA是相对虚拟地址(Relative Virtual Address)的缩写.RVA是当PE 文件被装载到内存中后,某个数据位置相对于文件头的偏移量. 例如:导入表的位置和大小可以从PE文件头中IM ...
- redis3.0 集群实战3 - java编程实战
本文主要描述使用jedis进行redis-cluster操作 jedis jedis是redis官方推荐使用的java redis客户端,github地址为,https://github.com/ ...
- spring bean加载顺序指定方式之一
在某些情况下,我们在容器启动的时候做一些事情,举个例子,加载缓存等.. 此时我们会希望某个bean先被加载并执行其中的afterpropertiesset方法. 因为spring默认是通过contex ...
- http服务&ajax编程
http服务&ajax编程 1.服务器 前言:通俗的讲,能够提供某种服务的机器(计算机)称为服务器 1.1.服务器类型 按照不同的划分标准,服务可划分为以下类型: 按服务类型可分为:文件服务器 ...
- Atitit.atiInputMethod v2词库清理策略工具 q229
Atitit.atiInputMethod v2词库清理策略工具 q229 1.1. Foreigncode 外码清理1 1.2. 垃圾词澄清1 1.1. Foreigncode 外码清理 On ...