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. 箭头符号方向键 使用键盘上的箭头方向键可以从 ...
随机推荐
- 淘宝内部分享:怎么跳出MySQL的10个大坑
编者按:淘宝自从2010开始规模使用MySQL,替换了之前商品.交易.用户等原基于IOE方案的核心数据库,目前已部署数千台规模.同时和Oracle, Percona, Mariadb等上游厂商有良好合 ...
- 倒排索引的AND操作
这是一道来自百度的面试题.倒排索引的AND操作. 倒排索引是以关键词作为索引项来索引文档的一种机制,如图中Brutus.Calpurnia.Caesar为关键词,2.4.8等等为文档ID. 现在有一个 ...
- 线段树(hdu 1556)
Problem Description: N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的"小飞鸽"牌电 ...
- javascript数组常用方法详解
1,splice(). array.splice(index,many,list1,list2....) 参数1.index位置 负数为从结尾处算,倒数第一为-1:参数2,many要删除的项目, ...
- Redis编码问题
最近搞redis存储对象出了点问题,大概说一下背景,项目原有的东东以前存的是redis,存储的直接是对象模型,没有问题,这里存储对象存储任何信息事都没有问题的.但是现在调整为存储序列化的json字符串 ...
- CSS清除float浮动
一.浮动产生原因 - TOP 一般浮动是什么情况呢?一般是一个盒子里使用了CSS float浮动属性,导致父级对象盒子不能被撑开,这样CSS float浮动就产生了. 本来两个黑色对象盒子是在 ...
- 纯css兼容个浏览器input[type='radio']不能自定义样式
各个浏览器对于表单input[type='radio'].input[type='checkbox']的样式总是各有差异 //html <div class="remember-a ...
- CF #365 703D. Mishka and Interesting sum
题目描述 D. Mishka and Interesting sum的意思就是给出一个数组,以及若干询问,每次询问某个区间[L, R]之间所有出现过偶数次的数字的异或和. 这个东西乍看很像是经典问题, ...
- Android Weekly Notes Issue #254
Android Weekly Issue #254 April 23rd, 2017 Android Weekly Issue #254 本期内容包括: 如何用Kotlin写一个Gradle Plug ...
- VueJS 事件修饰符
事件修饰符 在事件处理程序中调用 event.preventDefault() 或 event.stopPropagation()是非常常见的需求.尽管我们可以在 methods 中轻松实现这点,但更 ...