一天一条Linux指令-clear
来源:互联网 发布:果蔬榨汁搭配 书 知乎 编辑:程序博客网 时间:2024/05/13 05:46
用途说明
clear命令是用来清除终端屏幕的(clear the terminal screen),使用过DOS或者Windows的cmd的人知道有个cls命令,可以用来清除屏幕,但Linux底下没有这个命令,我们可以通过使用别名的方式来使Linux系统也具有这个cls命令。另外,按Ctrl+L也可以达到同样的效果,当我们使用vi/vim编辑文件时,如果发现屏幕显示有些混乱,也可以按Ctrl+L来使屏幕显示恢复正常。
常用参数
无。
如果想使输入cls也可以清屏,在/etc/profile的末尾添加一行:
alias cls=clear
保存之后重新登录就可以输入cls达到clear命令的效果了。
当然更快捷的方式是按住Ctrl键不放,然后再按L了。
使用示例
示例一 使用clear命令清除屏幕
[root@web ~]#
[root@web ~]#
[root@web ~]#
[root@web ~]#
[root@web ~]# clear
[root@web ~]#
示例二 使用Ctrl+L清除屏幕
[root@web ~]#
[root@web ~]#
[root@web ~]#
[root@web ~]#
[root@web ~]# Ctrl+L
[root@web ~]#
示例二 创建别名使cls也可以清除屏幕
[root@web ~]# cls
-bash: cls: command not found
[root@web ~]# alias cls=clear
[root@web ~]# cls
[root@web ~]#
0 0
- 一天一条Linux指令-clear
- 一天一条Linux指令-:
- 一天一条Linux指令-cd
- 一天一条Linux指令-apt
- 一天一条Linux指令-mount
- 一天一条Linux指令-ls
- 一天一条Linux指令-mkdir
- 一天一条Linux指令-cat
- 一天一条Linux指令-find
- 一天一条Linux指令-umount
- 一天一条Linux指令-cpu
- 一天一条Linux指令-CPU
- 一天一条Linux指令-file
- 一天一条Linux指令-mv
- 一天一条Linux指令-ln
- 一天一条Linux指令-dd
- 一天一条Linux指令-压缩
- 一天一条Linux指令-关机
- 在遍历List的过程中删除元素
- 一天一条Linux指令-nano
- ios developer tiny share-20161024
- ajax的async设置为true,即异步加载数据异常
- 7. Reverse Integer
- 一天一条Linux指令-clear
- 某互联网大厂kafka最佳实践
- Binary278FirstBadVersion
- Hibernate学习笔记
- android studio下的NDK开发详解(一)
- [BZOJ3887][Usaco2015 Jan]Grass Cownoisseur(tarjan+spfa)
- uigrid
- C#中使用try...catch...是否会影响程序性能
- TP 中return 能不能返回Json 数据