tar(tapearchive)
tar[主选项+辅选项]文件或目录列表
主选项:
-c创建新的档案文件
-r把要归档的文件追加到档案文件的末尾
-t列出档案文件的内容
-u用新文件取代原备份文件
-x从档案文件中释放文件
辅选项
-b设定磁带机
-f使用档案文件或设备,该选项是必选的
-k保存已存在的文件
-m在还原文件时把所有文件的修改时间设定为现在
-M创建多卷的档案文件,以便在多个磁盘上存放
-v详细报告tar处理文件的信息
-z用gzip来解压/压缩文件。压缩时用了该选项,解压时也要用该选项。使用了该选项时,归档文件的后缀不是.tar而是.gz 磁盘分区命令
磁盘分区工具fdisk。Linux给IDE设备分配了一个有hd前缀的文件,为SCSI设备分配一个有sd前缀的文件。
fdisk[选项] <磁盘对应的设备名>
-l列出指定磁盘的分区表
-v详细显示指令的执行过程
root@orisun-desktop:/home/orisun#fdisk /dev/sda
WARNING:DOS-compatible mode is deprecated. It's strongly recommended to
switchoff the mode (command 'c') and change display units to
sectors(command 'u').
Command(m for help): m
Commandaction
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)