位置: 编程技术 - 正文

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

  • 增值税的视同销售行为有哪些?
  • 个贷系统平账专户A户
  • 在企业所得税中增值税可以扣除吗
  • 处理企业的财产有哪些
  • 购入工程物资计入
  • 管理费用月末怎么结账
  • 培训费可以抵扣企业所得税
  • 有线电视基本收视维护费免征增值税
  • 发票税率开错怎么处理?
  • 小规模纳税人财务制度
  • 公司租土地建厂房应该怎么做账呢?
  • 固定资产清理会计处理例题
  • 如何代开外籍人员个人所得税完税凭证?
  • 个人财产税是什么意思
  • 远期汇票的付款期限可以表示为
  • 固定资产净值如何清零
  • 开票金额比收入高怎么办
  • 上月印花税计提多了如何冲回
  • 跨年度增值税发票作废怎么退税
  • php开源软件
  • 重装系统j
  • 关闭自动重新启动会怎样
  • vue3使用vueup/vue-quill富文本、并限制输入字数
  • PHP:imagecreatefromxpm()的用法_GD库图像处理函数
  • 个体工商户与家庭生活难以划分的费用
  • 经营租入的设备为什么不属于资产
  • 固定资产加速一次性扣除
  • 工会经费计税依据是上年工资还是当年工资
  • 一文讲清资产负债表中各个项目的来龙去脉
  • thinkphp log
  • 前端大佬都有谁
  • 微信小程序在哪里找?
  • thinkphp模型作用
  • php获取当前文件夹
  • 企业会计准则季报利润表本期金额怎么填
  • 装订好的凭证可以拆开吗
  • 购买需要安装的设备计入什么科目
  • 政府补助的核算内容有哪些
  • 固定资产报废计入资产处置损益吗
  • 税率开错了会影响贷款吗
  • 开票人是管理员可以报销吗
  • 水利基金申报表在哪找
  • 一般纳税人作废小规模时开的发票怎么报税
  • 高新企业申报条件有哪些
  • 公司吸收合并是利好吗
  • SQL server 2008中的数据库能否只包含数据文件
  • mysql内存使用率过高
  • 上年多交的增值税怎么调整
  • 以前年度是指哪一年
  • 支付补偿款计入什么会计科目
  • 企业实收资本的用途
  • 个税基数和社保有关系吗
  • 总公司中标分公司结算可以吗
  • 购买新发票的时候要带旧发票去吗?
  • 贷款购车怎么做会计分录
  • mysql error1418
  • mysql索引用法
  • 配置windouws update
  • Mac OS X 10.9 Mavericks系统怎么激活?
  • u盘发光
  • centos7 ifcfg-lo
  • ubuntu 重启xorg
  • win8安装应用商店
  • Win10预览版桌面图标和任务栏不翼而飞怎么办?
  • win10 edge浏览器崩溃
  • linux的虚拟终端有几个
  • JQuery.Ajax()的data参数类型实例详解
  • 编写批处理运行程序
  • bat批处理文件运行不了
  • android 图表控件
  • Python中urllib+urllib2+cookielib模块编写爬虫实战
  • js数组操作方法
  • python获取entry里输入的值
  • mongodb python
  • python裁剪不规则区域
  • jqgrid分页pager
  • js继承的方法
  • 山东税务局电子税务局申报
  • 新疆办房产证需要多久能拿证
  • 日本海淘推荐
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设