位置: 编程技术 - 正文

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盘中运行)

  • 金银首饰以旧换新增值税
  • 交易性资产入账金额和入账金额区别
  • 所得税忘了计提如何做会计分录还有结转
  • 企业所得税从业人数包括临时工吗
  • 填仓2021
  • 增值税发票可以抵扣多少
  • 对方收到发票不付款怎么办
  • 金蝶软件怎么设置会计科目
  • 报销发票财务一旦作废报销人可以收回吗?
  • 增值税普通发票有什么用
  • 开具红字发票后发现购买方已做抵扣怎么办
  • 专利权计入什么所得
  • 开通分期付款
  • 居民企业的判定条件
  • 劳务外包开票税目由所提供的服务性质来决定
  • 建筑工地伙食费会计分录
  • 营改增建筑业税率变化时间
  • 个体户需要交钱吗
  • 出纳员交接工作
  • 如何更改windows11显示语言
  • win10应用图标怎么调出来
  • 因有减免税款不退怎么办
  • 医院的重要
  • 免抵退税会计分录怎么写
  • 无私有住房证明怎么开
  • 卡洛里山脉
  • chrome使用教程
  • php bool
  • 前端解决跨域问题的代理
  • 一天撸一个财务APP系统【安卓端+前端+后端】
  • 从零开始吧
  • laravel实战教程
  • ajax获取php数据
  • thinkphp框架怎么用
  • ps抠图之后怎么拿出来
  • 工程质保金可以不退吗
  • 余额百分比法计提坏账准备
  • 用友t3制单日期定住不变
  • 个人捐赠支出税前扣除条件
  • 最新版税控盘怎么设置打印机
  • 所得税季报中的营业收入包括营业外收入吗
  • 购买电脑固定资产折旧怎么算
  • 企业所得税税前扣除项目有哪些
  • 小规模纳税人购进商品会计分录
  • 公司主要产品
  • 无形资产怎么计算公式
  • 支付技术转让费怎么入账
  • 出租车费用分录
  • 资产负债表与利润表的勾稽关系公式
  • 停车费专用发票
  • 购进销售产品的会计分录
  • 创建小企业
  • 公司自建的房子能买吗
  • 在docker中使用service命令
  • sqlserver 附加数据库 只读
  • 关于国际学校
  • 开启win7
  • mac上怎么查看qq聊天记录
  • ubuntu安装chia
  • linux网络编程视频教程
  • xp主题怎么改成win7
  • windows用户如何添加新用户账户信息
  • 批处理在windows中的典型应用
  • 如何永久激活win11
  • vim配置语法高亮
  • cocos2d动画
  • 帝国cms列表页隐藏部分文章
  • 启动dos快捷键
  • Node.js中的核心模块包括哪些内容?
  • ssm vue
  • shell脚本 \r
  • js自定义鼠标右键菜单
  • javascript字符
  • 安卓手机管家怎么关闭
  • jquery complete
  • Windows下python2.7.8安装图文教程
  • 四川国税局局长是谁
  • 专利转让个人所得税转换为经营所得
  • 宏观经济十大因素有哪些
  • 货车违章查哪个部门
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设