linux命令概论
来源:互联网 发布:孙俪的淘宝店铺叫什么 编辑:程序博客网 时间:2024/04/25 20:46
1 linux中命令的种类
<1>可执行文件
<2>shell内置命令
<3>shell函数
<4>alias命令
2 查看命令类型可以使用shell命令type
type command
示例如下:
xxx@LinuxDDD:/$ type cd
cd is a shell builtin
xxx@LinuxDDD:/$ type cp
cp is hashed (/bin/cp)
xxx@LinuxDDD:/$ type ls
ls is aliased to `ls --color=auto'
3 查看命令所在的位置
which command
示例如下:
xxx@LinuxDDD:/$ which cp
/bin/cp
4 获取命令的帮助信息
有help,--help,man,apropos,info,whatis之类的命令
help command //command是shell内置的命令,如cd
program --help //program是可执行程序,如cp,mkdir
man program //program是可执行程序,如cp,mkdir
apropos xxx //显示出和xxx相关的合适的命令
man -k xxx //作用和apropos类似
info program //用树形结构来显示帮助信息,类似网页,但是感觉不爽
whatis program //显示命令的简略信息
xxx@LinuxDDD:/$ whatis cp
cp (1) - copy filesand directories
xxx@LinuxDDD:/$ whatis ls
ls (1) - listdirectory contents
xxx@LinuxDDD:/$ whatis cd
cd: nothing appropriate.
5 别名
这个命令是alias,就是用来创建一条命令或者多条命令的别名。使用如下:
alias xxx=’command1;command2;command3;……commandn’
取消别名的方法:
unalias xxx
示例:
xxx@LinuxDDD:/$ alias foo='cd /home/tmp;ls;cd -;'
xxx@LinuxDDD:/$ foo
Hal2 install.sh new1 test.cpp~ x1
install2.sh new new1~ tmp x2
install2.sh~ new~ test tmp~ 搭建安卓开发环境.txt
/
xxx@LinuxDDD:/$ unalias foo
xxx@LinuxDDD:/$ type foo
bash: type: foo: not found
- linux命令概论
- Linux概论
- Linux - 计算机概论
- Linux网络管理员:网络概论
- Linux-计算机概论
- Linux设备驱动概论
- Linux进程概论
- Linux进程概论
- Linux 进程概论
- 实时和Linux之一: 概论
- Linux平台VPN技术概论
- Linux平台VPN技术概论
- Linux平台VPN技术概论
- linux初识之计算机概论
- linux学习一《计算机概论》
- Linux平台VPN技术概论
- Linux-鸟菜-0-计算机概论
- 概论
- BZOJ1029: [JSOI2007]建筑抢修
- Linux lookback驱动分析
- 堆内存和栈内存详解(转载)
- iOS中 KVO 键值观察者
- 林达华:Computer Vision的尴尬
- linux命令概论
- 几个字符串匹配算法
- KMP算法
- POJ2155 Matrix 二维树状数组
- [数据结构]字符串匹配(KMP方法)
- 软工文档简介
- MongoDb 的 MMAPv1 和 WiredTiger 存储引擎空间对比(800万文档 )
- 软件工程之软件维护
- Understanding the differences between client/server and peer-to-peer networks