1. tar命令追加与删除文件
-r参数向一个tar包增加文件(此参数对磁带设备无效)
tar -rvf file.tar file_add
--delete参数删除tar包中的file_delete文件
tar --delete -f file.tar file_delete
还有一个常用的-C参数,自己man下。
2. lsmcode -c 命令查看微码
$ lsmcode -c
The current permanent system firmware image is SF240_338
The current temporary system firmware image is SF240_403
The system is currently booted from the temporary firmware image.
3. snap命令收集系统信息步骤(需要root权限)
3.1、snap -r清理之前收集过的内容
3.2、snap -gc
The snap -g command gathers general system information, including the following:
* Error report
* Copy of the customized Object Data Manager (ODM) database
* Trace file
* User environment
* Amount of physical memory and paging space
* Device and attribute information
* Security user information
The Flags -c Creates a compressed pax image (snap.pax.Z file) of all files in the /tmp/ibmsupt directory tree or other named output directory.
4. pax 命令打包文件
打包./dir的目录为file.pax文件
pax -wvf file.pax ./dir
查看file.pax的文件
pax -vf file.pax
解压file.pax到当前目录
pax -rvf file.pax
向pax文件追加文件
pax -wavf file.pax ./file_add
注:也可以-x指定打包的格式,如-x pax, 默认格式为ustar格式,一种扩展的tar格式。
5. file.Z文件的压缩
compress file 压缩文件,生成一个file.Z的文件
uncompress file.Z 解压file.Z文件
6.Aix的compress、uncompress、pax、tar命令由软件包bos.tre.archive提供
$ which compress
/usr/bin/compress
$ lslpp -w /usr/bin/compress
File Fileset Type
----------------------------------------------------------------------------
/usr/bin/compress bos.rte.archive File
$ which uncompress
/usr/bin/uncompress
$ lslpp -w /usr/bin/uncompress
File Fileset Type
----------------------------------------------------------------------------
/usr/bin/uncompress,/usr/bin/zcat bos.rte.archive Hardlink
$ which pax
/usr/bin/pax
$ lslpp -w /usr/bin/pax
File Fileset Type
----------------------------------------------------------------------------
/usr/bin/pax bos.rte.archive File
$ which tar
/usr/bin/tar
$ lslpp -w /usr/bin/tar
File Fileset Type
----------------------------------------------------------------------------
/usr/bin/tar bos.rte.archive File
本文转自 pk2008 51CTO博客,原文链接:http://blog.51cto.com/837244/1131328