linux 命令(alias , unalias , install ,ar , arch ,uname )
user commands
1.alias
[ˈālēəs]:别名
alias --help

alias -p
打印已经设置的命令别名

测试别名 l

新建命令别名 a_t 并测试

删除 命令别名
unalias
unalias --help

用 unalias 删除 a_t 命令
unalias a_t

unalias -a 取消所有命令的别名
2.install
[inˈstôl] 安装
install --help

Usage: install [OPTION]... [-T] SOURCE DEST 源 目标 or: install [OPTION]... SOURCE... DIRECTORY 源 目录 or: install [OPTION]... -t DIRECTORY SOURCE... or: install [OPTION]... -d DIRECTORY... This install program copies files (often just compiled) into destination locations you choose. If you want to download and install a ready-to-use package on a GNU/Linux system, you should instead be using a package manager like yum(1) or apt-get(1).
install 程序 会copy(通常是编译)文件到你选择的目标地点。如果你想在GUN/Linux系统上下载并安装及时可用的包,
你可以使用包管理命令 : yum(1) 或者 apt-get(1) In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group. In the 4th form, create all components of the given DIRECTORY(ies). 前面三种格式,是copy 源文件到目标地 或者 copy多个文件到已存在的目录,同时可以设置权限模式和所有制/组
第四种格式,会创建所有目录以及他们的上层目录(创建给定的目录结构) Mandatory arguments to long options are mandatory for short options too.
长option 必须的参数 短option也是强制需要的 (如下面的 长option --mode=MODE -m也需要参数MODE -m=MODE) --backup[=CONTROL] make a backup of each existing destination file
为每个已存在的目标文件进行备份 -b like --backup but does not accept an argument
形如 --backup 但是不接收参数 -c (ignored) -C, --compare each pair of source and destination files, and in some cases, do not modify the destination at all
逐个比较源文件和目标文件,在某些情况下根本不用修改目标文件 -d, --directory intreat all arguments as directory names; create all components of the specified directories
参数将会被视为目录的名称,而且会创建给定的目录结构 -D create all leading components of DEST except the last, then copy SOURCE to DEST
创建除最后目录的所有主目录 并将源文件copy的目标文件 -g, --group=GROUP set group ownership, instead of process' current group
设置组所有权,替换进程当前组 -m, --mode=MODE set permission mode (as in chmod), instead of rwxr-xr-x
设定权限模式 -o, --owner=OWNER set ownership (super-user only)
设置所有权(仅限于超级用户) -p, --preserve-timestamps apply access/modification times of SOURCE files to corresponding destination files
[priˈzərv]:保留。保留时间戳,保留源文件访问和修改的时间 到相应的目标文件。 -s, --strip strip symbol tables
删除符号表 --strip-program=PROGRAM program used to strip binaries
去除二进制文件的程序 -S, --suffix=SUFFIX override the usual backup suffix
重写备份文件的后缀名 -t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY
copy源文件的所有参数信息到目录 -T, --no-target-directory treat DEST as a normal file
把目标当做正常文件 -v, --verbose print the name of each directory as it is created
创建目录时打印每个目录的名称 --preserve-context preserve SELinux security context
保留 SELinux 安全上下文 -Z, --context=CONTEXT set SELinux security context of files and directories
设置 SELinux 文件和目录的安全上下文 --help display this help and exit --version output version information and exit The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. Here are the values: 备份后缀为'~',除非用suffix或SIMPLE_BACKUP_SUFFIX设置。
可以通过选择 --backup option 进行版本控制 或通过 VERSION_CONTROL 环境变量设置 none, off never make backups (even if --backup is given)
永远不备份 numbered, t make numbered backups
编号备份 existing, nil numbered if numbered backups exist, simple otherwise
显示 numbered 或 simple 备份 simple, never always make simple backups 永远不做简单备份 Report install bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> For complete documentation, run: info coreutils 'install invocation'
测试
file.txt 备份到 back_file
install file.txt back_file

添加 后缀名
install -S .txt file.txt back_file

file.txt 备份到已存在目录中
install file.txt dir1/back_file.txt

file.txt 备份在不存在的指定目录
install -D file.txt dir3/back_file.txt

创建目录
install -d dir4/sub_dir1
install -dv dir5/sub #创建并打印目录


3. ar
http://liaoph.com/linux-shared-libary/
http://www.cnblogs.com/yangg518/p/5842651.html
http://blog.csdn.net/xuhongning/article/details/6365200
The GNU ar program creates, modifies, and extracts from archives. An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual files (called members of the archive).
see also nm , ranlib
archive : [ˈärˌkīv]
Gun ar 命令 用来创建、修改 或 提取库成员。库是一个单一文件,它用一个结构保存其他文件的组织集合。这样就可以检索原始的单个文件(称为库成员)。
ar --help

Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
ar -M [<mri-script]
commands:
d - delete file(s) from the archive
删除库中文件
m[ab] - move file(s) in the archive
在库中移动文件
p - print file(s) found in the archive
打印库中发现的的文件
q[f] - quick append file(s) to the archive
快速添加文件到库
r[ab][f][u] - replace existing or insert new file(s) into the archive
替换或插入文件到库
s - act as ranlib
作为ranlib命令(ranlib usage generate an index to speed access to archives: ranlib 用于生成索引以加快对库文件的访问)
t - display contents of archive
显示库文件内容
x[o] - extract file(s) from the archive
从库文件中提取
command specific modifiers:
命令特定修饰符
[a] - put file(s) after [member-name]
把文件放在某成员的后面
[b] - put file(s) before [member-name] (same as [i])
把文件放在某成员的前面
[D] - use zero for timestamps and uids/gids
使用0 作为时间戳 和 uids/gids
[U] - use actual timestamps and uids/gids (default)
使用实际的时间作为时间戳和uids/gids
[N] - use instance [count] of name
[f] - truncate inserted file names
截取插入文件的名字
[P] - use full path names when matching
匹配时使用全路径名
[o] - preserve original dates
保留原始日期
[u] - only replace files that are newer than current archive contents
仅替换比当前库文件内容 更新 的文件
generic modifiers:
[c] - do not warn if the library had to be created
如果要创建库,不要发出警告
[s] - create an archive index (cf. ranlib)
创建库索引
[S] - do not build a symbol table
不要创建符号表
[T] - make a thin archive
创建 thin archive
[v] - be verbose
[vərˈbōs]:冗长的
[V] - display the version number
显示版本号
@<file> - read options from <file>
--target=BFDNAME - specify the target object format as BFDNAME
optional:
--plugin <p> - load the specified plugin
emulation options:
No emulation specific options
ar: supported targets: elf64-x86- elf32-i386 elf32-x86- a. elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-x86- pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
Report bugs to <http://www.sourceware.org/bugzilla/>
测试
查看 服务器中有哪些 静态库文件
find / -name '*.a' | xargs du -k

找两个比较小的文件,查看其内容
ar -t /usr/lib/x86_64-linux-gnu/libdl.a
ar -t /usr/lib/x86_64-linux-gnu/libg.a

创建静态库 libtest.a 并测试
ar r libtest.a test.o #添加 ar -t libtest.a #查看 ar q libtest.a test_2.o #追加 ar q libtest.a test_3.o #追加 ar m -a test_3.o libtest.a test.o # 移动 :test.o after test_3 ar m -b test_2.o libtest.a test_3.o #移动 :test_3.o before test_2.o ar d libtest.a test_2.o #删除

4.arch
Print machine architecture . see also uname
打印机器架构。
ar --help

arch

5.uname
Print certain system information.
打印某些信息
uname --help

Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.
打印某些系统信息。Option 不写,同 uname -s (打印内核名称)
-a, --all print all information, in the following order,
按以下顺序,打印所有信息
except omit -p and -i if unknown:
除了 -p 和 -i 之类
-s, --kernel-name print the kernel name
打印内核名称
-n, --nodename print the network node hostname
打印网络节点主机名
-r, --kernel-release print the kernel release
打印内核release 版本号
-v, --kernel-version print the kernel version
打印内核版本
-m, --machine print the machine hardware name
打印设备硬件名
-p, --processor print the processor type or "unknown"
打印处理器类型或未知
-i, --hardware-platform print the hardware platform or "unknown"
打印硬件平台或未知
-o, --operating-system print the operating system
打印操作系统
--help display this help and exit
显示此命令帮助 并退出
--version output version information and exit
输出版本信息并退出
Report uname bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'uname invocation'
测试

-----------------
linux 命令(alias , unalias , install ,ar , arch ,uname )的更多相关文章
- linux命令 - alias
linux命令 - alias 为自己的常用命令语句指定别名,快捷方式 $ alias /? Usage: alias [/reload] [/d] [name=full command] /relo ...
- Linux命令alias - 设置命令的别名
用途说明设置命令的别名.在linux系统中如果命令太长又不符合用户的习惯,那么我们可以为它指定一个别名.虽然可以为命令建立“链接”解决长文件名的问题,但对于带命令行参数的命令,链接就无能为力了.而指定 ...
- Linux命令详解-install
install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户. 1.命令格式: (1)install [选项]... 来源 目的地 (2)install [选项]... 来源... 目录 ...
- Linux 命令 - alias: 设置或显示别名
当一个命令太长或者不符合用户的习惯,那么可以为该命令指定一个符合用户习惯的别名.比如习惯 DOS 命令的用户可以使用 alias md='mkdir' 命令将 md 来替换 mkdir.有时也为经常调 ...
- linux命令alias永久配置
需求:清屏的指令是:clear,感觉用着不爽,写这个命令太慢,想自定义命令:cls 解决:命令别名指令:alias 1:查看当前系统中有哪些别名:命令行输入:alias 2:添加我们自己的别名:ali ...
- linux命令学习笔记 : install 命令
install .作用 install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户. .格式 ()install [选项]... 来源 目的地 ()install [选项]... 来源 ...
- linux命令的别名alias,unalias
1. 别名 linux别名alias的作用: 1. 简化特别长得命令和參数 2. 对一些命令添加默认选项.提高安全性. 2. alias使用 [www@work sh]$ alias lm='ls - ...
- Linux命令之ar - 创建静态库.a文件和动态库.so
转自:http://blog.csdn.net/eastonwoo/article/details/8241693 用途说明 创建静态库.a文件.用C/C++开发程序时经常用到,但我很少单独在命令行中 ...
- 每日linux命令学习-历史指令查询(history、fc、alias)
linux历史机制对命令行中输入的命令进行编号并依此保存,以维护命令历史.登录会话期间输入的命令保存在shell内存中,若终止命令则添加至历史文件. 1. 箭头符号方向键 使用键盘上的箭头方向键可以从 ...
随机推荐
- SpringMVC基础学习(三)—参数绑定
一.基本数据类型的绑定 页面 <form action="${pageContext.request.contextPath}/test.do" method="p ...
- Spring+SpringMVC+MyBatis+easyUI整合优化篇(五)结合MockMvc进行服务端的单元测试
日常啰嗦 承接前一篇文章<Spring+SpringMVC+MyBatis+easyUI整合优化篇(四)单元测试实例>,已经讲解了dao层和service层的单元测试,还有控制器这层也不能 ...
- [编织消息框架][JAVA核心技术]动态代理应用9-扫描class
之前介绍的annotationProcessor能在编译时生成自定义class,但有个缺点,只能每次添加/删除java文件才会执行,那天换了个人不清楚就坑大了 还记得之前介绍的编译时处理,懒处理,还有 ...
- tmux鼠标配置出现错误unknown option: mode-mouse
setw -g mode-mouse on set -g mouse-select-pane on set -g mouse-resize-pane on set -g mouse-select-wi ...
- Load 数据1
Druid 的load 数据分为两类 :批量load(历史数据) 和实时load(新数据) ,本文介绍批量load 数据 indexing 服务 批量load 数据需要用到indexing 服务,它是 ...
- CSS也需要重构
最初接触到的CSS面向对象,是项目里的CSS超过8千行,缺乏约束和管理,在近期或不远的将来,有迫切的要求需要重构.CSS面向对象和模块化. CSS代码遇到的问题: 重用性差,看着一个CSS的名称,很难 ...
- ZJOI2008树的统计Count
知识点-树链剖分 "在一棵树上进行路径的修改.求极值.求和":乍一看只要线段树就能轻松解决,实际上,仅凭线段树是不能搞定它的.我们需要用到一种貌似高级的复杂算法--树链剖分. ...
- R中基本统计图
一.条形图 1.安装包install.packages("vcd"); library(vcd);count<-table(Arthritis$Improved);#tabl ...
- .NET跨平台实践:再谈用C#开发Linux守护进程
Linux守护进程是Linux的后台服务进程,相当于Windows服务进程,对于为Linux开发服务程序的朋友来说,Linux守护进程相关技术是必不可少的,因为这个技术不仅仅是开发守护进程,还可以拓展 ...
- 修改linux系统时间和同步
date 查看当前时间 date -s 15:14:13 修改时间 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 修改时区 yes cront ...