位置: 编程技术 - 正文

tar命令(tar命令参数详解)

编辑:rootadmin
怎样使用tar命令打包(备份)文件?A:The syntax of tar is:tar [options][files]The options used most often with tar are as follows:c Creates a new backup,overwriting any files already on the backup destination.x Extracts files from backup media.t Lists the contents of backup media.v Displays the name of each file being processed.f Creates backups on a specified device.u Adds files to the backup if they are not already there,or if they have been modified since they were last written on the backup.步骤:1)估算打包文件的大小,确定使用档案媒体(archive media)的空间,用命令du -s例如:$ lfa.out* fork.c mbox time.catoi.c int.c memcpy.c vi$ du -s .$该例显示的代表the total number of -byte blocks,计算:*/=kilobytes.2)制作备份,用命令tar cvf /dev/fdds .(将该目录下的所有内容备份到1.英寸软盘中where c causes a new backup to be created,v causes each file to be displayed as the backing up takes place,and f causes the subsequent argument--/dev/fdds to be the destination of the backup.)注:平时硬盘上的备份,我们一般用命令tar cvf filename.tar .例如:$ tar cvf wuyd.tar .a ./.profile 2 tape blocksa ./.lastlogin 0 tape blocksa ./mbox tape blocksa ./fork.c 2 tape blocksa ./memcpy.c 1 tape blocksa ./.sh_history 3 tape blocksa ./a.out tape blocksa ./time.c 1 tape blocksa ./vi tape blocksa ./int.c 1 tape blocksa ./atoi.c 1 tape blockstar: same as archive file: ./wuyd.tara ./.scoadmin.pref 1 tape blocks$ lfa.out* fork.c mbox time.c wuyd.taratoi.c int.c memcpy.c vi我们还可以用命令tar cvf /dev/fdds ./filename将该目录下的名为filename的文件备份到archive media中怎样列出tar文档的内容?A:tar tvf /dev/fddstar tvf filename.tar例如:$ tar tvf wuyd.tartar: blocksize = rw-------/ Sep : ./.profiler--------/ 0 Sep : ./.lastloginrw-------/ Sep : ./mboxrw-r--r--/ Sep : ./fork.crw-r--r--/ Sep : ./memcpy.crw-------/ Sep : ./.sh_historyrwxr-xr-x/ Sep : ./a.outrw-r--r--/ Sep : ./time.crw-r--r--/ Sep : ./virw-r--r--/ Sep : ./int.crw-r--r--/ Sep : ./atoi.crw-r--r-- 0/3 Sep : ./.scoadmin.pref$怎样从tar文档中导出文件?A:tar xvf /dev/fddstar xvf filename.tar例如:$ mkdir uu;cp wuyd.tar ./uu$ lfa.out* fork.c mbox time.c viatoi.c int.c memcpy.c uu/ wuyd.tar$ cd uu$ tar xvf wuyd.tartar: blocksize = x ./.profile, bytes, 2 tape blocksx ./.lastlogin, 0 bytes, 0 tape blocksx ./mbox, bytes, tape blocksx ./fork.c, bytes, 2 tape blocksx ./memcpy.c, bytes, 1 tape blocksx ./.sh_history, bytes, 3 tape blocksx ./a.out, bytes, tape blocksx ./time.c, bytes, 1 tape blocksx ./vi, bytes, tape blocksx ./int.c, bytes, 1 tape blocksx ./atoi.c, bytes, 1 tape blocksx ./.scoadmin.pref, bytes, 1 tape blocks$我们可用命令tar xvf /dev/fdds ./filename导出archive media中的单个文件例如:$ lfwuyd.tar$ tar xvf wuyd.tar ./time.ctar: blocksize = x ./time.c, bytes, 1 tape blocks$ lftime.c wuyd.tar$怎样使用tar命令提供的简写形式?A:$ more /etc/default/tar# @(#) def.src .2 //## Copyright (C) - The Santa Cruz Operation, Inc.# All Rights Reserved.# The information in this file is provided for the exclusive use of# the licensees of The Santa Cruz Operation, Inc. Such users have the# right to use, modify, and incorporate this code into other products# for purposes authorized by the license agreement provided they include# this notice and the associated copyright notice with any such product.# The information in this file is provided "AS IS" without warranty.## default/tar - archive devices: tar(C)## device block size tape#archive0=/dev/rfdds9 narchive1=/dev/rfdds9 narchive2=/dev/rfdds narchive3=/dev/rfdds n# archive4=/dev/rfdds9 narchive4=/dev/rfdds9 narchive5=/dev/rfdds9 n# archive5=/dev/rfdds9 narchive6=/dev/rfdds narchive7=/dev/rfdds narchive8=/dev/rct0 0 yarchive9=/dev/rctmini 0 yarchive=/dev/rdsk/fpd narchive=/dev/rdsk/fph narchive=/dev/rdsk/fpv n## The default device in the absence of a numeric or "-f device" argument

推荐整理分享tar命令(tar命令参数详解),希望有所帮助,仅作参考,欢迎阅读内容。

tar命令(tar命令参数详解)

文章相关热门搜索词:tar命令打包一个目录,tar命令详解,tar命令的用法,tar命令解压tar.gz文件,tar命令压缩,tar命令打包一个目录,tar命令的用法,tar命令的用法,内容如对您有帮助,希望把文章链接给更多的朋友!

U盘上运行的linux系统--babylinux 下载地址1:

linux Intel 集成显示驱动下载 linuxintel集成显卡驱动下载驱动地址:

Linux编译内核 Linux编译内核-准备工作通常要运行的第一个命令是:#cd/usr/src/linux;makemrproper该命令确保源代码目录下没有不正确的.o文件以及文件的互相依赖配置??接

标签: tar命令参数详解

本文链接地址:https://www.jiuchutong.com/biancheng/366898.html 转载请保留说明!

上一篇:Linux必学的60个命令(2)-文件处理(linux必学的60个命令rar)

下一篇:U盘上运行的linux系统--babylinux(linux在u盘中运行)

  • 所得税费用会计准则
  • 子公司自购买日开始持续计算的净资产包括商誉吗
  • 外币账户单位基本情况表
  • 存在弃置费用的固定资产的财务费用
  • 小规模纳税人税控系统
  • 调减加计抵减额会计分录
  • 企业年报股东及出资信息要怎么填写
  • 增值发票盖章有什么用
  • 物业公司银行存款专款专怎么做分录
  • 非房地产企业销售不动产增值税计算
  • 冲减存货的会计分录
  • 税务机关对企业实施特别纳税调整,涉及企业向境外
  • 房产公司要交房产税吗
  • 去年结转本年利润数字错了今年能更改吗
  • 注销时其他应付款余额怎么账务处理
  • 公司账上的应付账款是指
  • 事业单位上级拨入资金属于什么科目
  • 在建工程预付款项记入什么会计科目
  • 外资企业需要遵守哪些法律
  • 预缴税款的附加税可以抵扣吗
  • 报销单大写金额填写格式1000
  • 生产型企业一般会有哪些外来文件
  • 企业上月份销售收入在本月份发生销售折让时
  • 非绑定账户转入啥意思
  • 加计扣除10%进项税政策文件
  • 一次性领取的年金 税率表
  • 无偿赠送资产需要交哪些税
  • 月末一次加权平均法是什么意思
  • 酒店安装监控费用谁出
  • 卖固定资产如何申报
  • win10怎么关掉
  • php上传进度条
  • 商贸企业销售会计分录
  • 个人签订的出租协议
  • 克扣拆迁款
  • php pdo连接mysql
  • 后端三件套
  • iframe嵌套页面点击里面的按钮
  • 功能强大的php文件有哪些
  • 残疾人就业保障金计入什么科目
  • python获取值对应的键
  • 房地产开发费用最高扣除比例
  • 预交的企业所得税如何记账
  • phpcms v9网页禁止复制
  • 什么是三证合一纳税人
  • 全年一次性奖金单独计税还是并入
  • 地税发票丢失应如何处理
  • 年报中的资产总额怎么计算
  • 少数股东权益贷方表示什么意思
  • 捐赠 赞助 区别
  • 销项税计提多了
  • 固定资产出售的收入属于收入吗
  • 工程材料如何管理
  • 固定资产发票未到可以确认固定资产吗
  • 生产成本的会计科目分录
  • 政府会计累计盈余借贷方向
  • 可供出售金融资产是指什么
  • 维修费收入怎么结转销售成本
  • 主营业务税金及附加借贷方向
  • mysql几天能学会
  • 设置共享时可使用的权限
  • windows server 2008 r2开启远程访问
  • ubuntu gnome3
  • ubuntu不支持设置属性
  • win7开始图标怎么变大点
  • 深度技术的系统好不好
  • Linux系统怎么用FTP传文件
  • JavaScript数组删除元素
  • rapidjson使用
  • js获取页面元素的方法
  • 利用python读取文件
  • js setTimeout opener的用法示例详解
  • unity怎么替换模型位置
  • Android之SQLite
  • static function FindObjectsOfType (type : Type) : Object[]
  • js选择框全选
  • python的编码
  • 税务暂停办理业务通知
  • 重置税务密码
  • 安徽省印花税核定
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设