一. 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 ...
随机推荐
- 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
错误:已超过传入消息(65536)的最大消息大小配额.若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性. 或者 错误:反序列化操作“GetAllUserData ...
- 原生javascript模仿win8等待进度条。
一.序言 一直很中意win8等待提示圆圈进度条.win8刚出来那会,感觉好神奇!苦于当时没思路,没去研究.通过最近网上找找资料,终于给搞出来了!先上Demo,献丑了!预览请看:win8进度条. 二.简 ...
- ASP.Net中Session失效的一种编程思路
在写一个客户的B/S结构应用程序时,突然发现一个技巧,不知道是否是MS的一个BUG,给相关的有研究的朋友原先考虑写一个检查Session的类,Session失效后,必须转向登陆页面,可每一个调用该类的 ...
- 【原创】C#通用权限管理-程序安全检查,这些你一定要考虑到位
接触通用权限已经一年,现在使用已经很熟练,分享通用权限管理下面的一些好的开发思想. 安全漏洞对于一个小项目来说,可能不是特别的重视,对于一个大项目来说,这是特别重要需要注意的,特别是在项目开发中的就要 ...
- HTML5实现屏幕手势解锁(转载)
来源:https://github.com/lvming6816077/H5lockhttp://threejs.org/examples/http://www.inf.usi.ch/phd/wett ...
- ActiveReports 报表应用教程 (6)---分组报表
在 ActiveReports 中可以设置单级分组.嵌套分组,同时,还可以使用表格.列表以及矩阵等数据区域控件对数据源进行分组操作.分组报表在商业报表系统中应用不胜枚举,客户信息归类统计表.商品分类统 ...
- mysql grant all on *.* to xxx@'%' 报Access denied for user 'root'@'localhost'
今日,开发反馈某台mysql服务器无法登陆,解决之后,远程登录后发现用户只能看到information_schema,其他均看不到. 故登录服务器执行: mysql> grant all on ...
- winform里面网页显示指定内容
今天有个同事问了一下我,怎么在winform里面打开网页啊?我们都是基于C/S的开发,很少接触winform,所以我当时就懵了,实在不知道怎么回答,所以索性说不知道.但是我又想了想,这个应该是个很简单 ...
- ADO.NET 增删改查的基本用法
ADO.NET:数据访问技术 就是将C#和MSSQL连接起来的一个纽带 可以通过ADO.NET将内存中的临时数据写入到数据库中也可以将数据库中的数据提取到内存中供程序调用 所有数据访问技术的基础 连接 ...
- SharePoint DateTimeControl 使用
首先,需要引用: <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebCo ...