Merge pull request #10 from LCTT/master

更新
This commit is contained in:
Lv Feng 2016-09-21 21:33:54 -05:00 committed by GitHub
commit 14dffd97cf
6 changed files with 205 additions and 200 deletions

View File

@ -1,52 +0,0 @@
translating by Chao-zhi
Adobe's new CIO shares leadership advice for starting a new role
====
![](https://enterprisersproject.com/sites/default/files/styles/620x350/public/images/CIO_Leadership_3.png?itok=QWUGMw-V)
Im currently a few months into a new CIO role at a highly-admired, cloud-based technology company. One of my first tasks was to get to know the organizations people, culture, and priorities.
As part of that goal, I am visiting all the major IT sites. While In India, less than two months into the job, I was asked directly: “What are you going to do? What is your plan?” My response, which will not surprise seasoned CIOs, was that I was still in discovery mode, and I was there to listen and learn.
Ive never gone into an organization with a set blueprint for what Ill do. I know some CIOs have a playbook for how they will operate. Theyll come in and blow the whole organization up and put their set plan in motion.
Yes, there may be situations where things are massively broken and not working, so that course of action makes sense. Once Im inside a company, however, my strategy is to go through a discovery process. I dont want to have any preconceived notions about the way things should be or whats working versus whats not.
Here are my guiding principles as a newly-appointed leader:
### Get to know your people
This means building relationships, and it includes your IT staff as well as your business users and your top salespeople. What are the top things on their lists? What do they want you to focus on? Whats working well? Whats not? How is the customer experience? Knowing how you can help everyone be more successful will help you shape the way you deliver services to them.
If your department is spread across several floors, as mine is, consider meet-and-greet lunches or mini-tech fairs so people can introduce themselves, discuss what theyre working on, and share stories about their family, if they feel comfortable doing that. If you have an open-door office policy, make sure they know that as well. If your staff spreads across countries or continents, get out there and visit as soon as you reasonably can.
### Get to know your products and company culture
One of the things that surprised me coming into to Adobe was how broad our product portfolio is. We have a platform of solutions and services across three clouds Adobe Creative Cloud, Document Cloud and Marketing Cloud and a vast portfolio of products within each. Youll never know how much opportunity your new company presents until you get to know your products and learn how to support all of them. At Adobe we use many of our digital media and digital marketing solutions as Customer Zero, so we have first-hand experiences to share with our customers
### Get to know customers
Very early on, I started getting requests to meet with customers. Meeting with customers is a great way to jump-start your thinking into the future of the IT organization, which includes the different types of technologies, customers, and consumers we could have going forward.
### Plan for the future
As a new leader, I have a fresh perspective and can think about the future of the organization without getting distracted by challenges or obstacles.
What CIOs need to do is jump-start IT into its next generation. When I meet my staff, Im asking them what we want to be three to five years out so we can start positioning ourselves for that future. That means discussing the initiatives and priorities.
After that, it makes sense to bring the leadership team together so you can work to co-create the next generation of the organization its mission, vision, modes of alignment, and operating norms. If you start changing IT from the inside out, it will percolate into business and everything else you do.
Through this whole process, Ive been very open with people that this is not going to be a top-down directive. I have ideas on priorities and what we need to focus on, but we have to be in lockstep, working as a team and figuring out what we want to do jointly.
--------------------------------------------------------------------------------
via: https://enterprisersproject.com/article/2016/9/adobes-new-cio-shares-leadership-advice-starting-new-role
作者:[Cynthia Stoddard][a]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://enterprisersproject.com/user/cynthia-stoddard

View File

@ -1,147 +0,0 @@
Translating by bianjp
Basic Linux Networking Commands You Should Know
==================================================
![](https://itsfoss.com/wp-content/uploads/2016/06/Basic-Networking-Commands-Linux.jpg)
Brief: A collection of most important and yet basic Linux networking commands an aspiring Linux SysAdmin and Linux enthusiasts must know.
Its not every day at Its FOSS that we talk about the “command line side” of Linux. Basically, I focus more on the desktop side of Linux. But as some of you readers pointed out in the internal survey (exclusive for Its FOSS newsletter subscribers), that you would like to learn some command line tricks as well. Cheat sheets were also liked and encouraged by most readers.
For this purpose, I have compiled a list of the basic networking commands in Linux. Its not a tutorial that teaches you how to use these commands, rather, its a collection of commands and their short explanation. So if you already have some experience with these commands, you can use it for quickly remembering the commands.
You can bookmark this page for quick reference or even download all the commands in PDF for offline access.
I had this list of Linux networking commands when I was a student of Communication System Engineering. It helped me to get the top score in Computer Networks course. I hope it helps you in the same way.
>Exclusive bonus: [Download Linux Networking Commands Cheat Sheet][1] for future reference. You can print it or save it for offline viewing.
### List of basic networking commands in Linux
I used FreeBSD in the computer networking course but the UNIX commands should work the same in Linux also.
#### Connectivity:
- ping <host> —- sends an ICMP echo message (one packet) to a host. This may go continually until you hit Control-C. Ping means a packet was sent from your machine via ICMP, and echoed at the IP level. ping tells you if the other Host is Up.
- telnet host <port> —- talk to “hosts” at the given port number. By default, the telnet port is port 23. Few other famous ports are:
```
7 echo port,
25 SMTP, use to send mail
79 Finger, provides information on other users of the network
```
Use control-] to get out of telnet.
#### Arp:
Arp is used to translate IP addresses into Ethernet addresses. Root can add and delete arp entries. Deleting them can be useful if an arp entry is malformed or just wrong. Arp entries explicitly added by root are permanent — they can also be by proxy. The arp table is stored in the kernel and manipulated dynamically. Arp entries are cached and will time out and are deleted normally in 20 minutes.
- arp a : Prints the arp table
- arp s <ip_address> <mac_address> [pub] to add an entry in the table
- arp a d to delete all the entries in the ARP table
#### Routing:
- netstat r —- Print routing tables. The routing tables are stored in the kernel and used by ip to route packets to non-local networks.
- route add —- The route command is used for setting a static (non-dynamic by hand route) route path in the route tables. All the traffic from this PC to that IP/SubNet will go through the given Gateway IP. It can also be used for setting a default route; i.e., send all packets to a particular gateway, by using 0.0.0.0 in the pace of IP/SubNet.
- routed —– The BSD daemon that does dynamic routing. Started at boot. This runs the RIP routing protocol. ROOT ONLY. You wont be able to run this without root access.
- gated —– Gated is an alternative routing daemon to RIP. It uses the OSPF, EGP, and RIP protocols in one place. ROOT ONLY.
- traceroute —- Useful for tracing the route of IP packets. The packet causes messages to be sent back from all gateways in between the source and destination by increasing the number of hopes by 1 each time.
- netstat rnf inet : it displays the routing tables of IPv4
- sysctl net.inet.ip.forwarding=1 : to enable packets forwarding (to turn a host into a router)
- route add|delete [-net|-host] <destination> <gateway> (ex. route add 192.168.20.0/24 192.168.30.4) to add a route
- route flush : it removes all the routes
- route add -net 0.0.0.0 192.168.10.2 : to add a default route
- routed -Pripv2 Pno_rdisc d [-s|-q] to execute routed daemon with RIPv2 protocol, without ICMP auto-discovery, in foreground, in supply or in quiet mode
- route add 224.0.0.0/4 127.0.0.1 : it defines the route used from RIPv2
- rtquery n : to query the RIP daemon on a specific host (manually update the routing table)
#### Others:
- nslookup —- Makes queries to the DNS server to translate IP to a name, or vice versa. eg. nslookup facebook.com will gives you the IP of facebook.com
- ftp <host>water —– Transfer files to host. Often can use login=“anonymous” , p/w=“guest”
- rlogin -l —– Logs into the host with a virtual terminal like telnet
#### Important Files:
```
/etc/hosts —- names to ip addresses
/etc/networks —- network names to ip addresses
/etc/protocols —– protocol names to protocol numbers
/etc/services —- tcp/udp service names to port numbers
```
#### Tools and network performance analysis
- ifconfig <interface> <address> [up] : start the interface
- ifconfig <interface> [down|delete] : stop the interface
- ethereal & : it allows you open ethereal background not foreground
- tcpdump i -vvv : tool to capture and analyze packets
- netstat w [seconds] I [interface] : display network settings and statistics
- udpmt p [port] s [bytes] target_host : it creates UDP traffic
- udptarget p [port] : its able to receive UDP traffic
- tcpmt p [port] s [bytes] target_host : it creates TCP traffic
- tcptarget p [port] its able to receive TCP traffic
- ifconfig netmask [up] : it allows to subnet the sub-networks
#### Switching:
- ifconfig sl0 srcIP dstIP : configure a serial interface (do “slattach l /dev/ttyd0” before, and “sysctl net.inet.ip.forwarding=1“ after)
- telnet 192.168.0.254 : to access the switch from a host in its subnetwork
- sh ru or show running-configuration : to see the current configurations
- configure terminal : to enter in configuration mode
- exit : in order to go to the lower configuration mode
#### VLAN:
- vlan n : it creates a VLAN with ID n
- no vlan N : it deletes the VLAN with ID N
- untagged Y : it adds the port Y to the VLAN N
- ifconfig vlan0 create : it creates vlan0 interface
- ifconfig vlan0 vlan ID vlandev em0 : it associates vlan0 interface on top of em0, and set the tags to ID
- ifconfig vlan0 [up] : to turn on the virtual interface
- tagged Y : it adds to the port Y the support of tagged frames for the current VLAN
#### UDP/TCP
- socklab udp it executes socklab with udp protocol
- sock it creates a udp socket, its equivalent to type sock udp and bind
- sendto <Socket ID> <hostname> <port #> emission of data packets
- recvfrom <Socket ID> <byte #> it receives data from socket
- socklab tcp it executes socklab with tcp protocol
- passive it creates a socket in passive mode, its equivalent to socklab, sock tcp, bind, listen
- accept it accepts an incoming connection (it can be done before or after creating the incoming connection)
- connect <hostname> <port #> these two commands are equivalent to socklab, sock tcp, bind, connect
- close it closes the connection
- read <byte #> to read bytes on the socket
- write (ex. write ciao, ex. write #10) to write “ciao” or to write 10 bytes on the socket
#### NAT/Firewall
- rm /etc/resolv.conf it prevent address resolution and make sure your filtering and firewall rules works properly
- ipnat f file_name it writes filtering rules into file_name
- ipnat l it gives the list of active rules
- ipnat C F it re-initialize the rules table
- map em0 192.168.1.0/24 -> 195.221.227.57/32 em0 : mapping IP addresses to the interface
- map em0 192.168.1.0/24 -> 195.221.227.57/32 portmap tcp/udp 20000:50000 : mapping with port
- ipf f file_name : it writes filtering rules into file_name
- ipf F a : it resets the rule table
- ipfstat I : it grants access to a few information on filtered packets, as well as active filtering rules
--------------------------------------------------------------------------------
via: https://itsfoss.com/basic-linux-networking-commands/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ItsFoss+%28Its+FOSS%21+An+Open+Source+Blog%29
作者:[Abhishek Prakash][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[1]: https://drive.google.com/open?id=0By49_3Av9sT1cDdaZnh4cHB4aEk

View File

@ -0,0 +1,50 @@
Adobe 的新任首席信息官CIO股份领导对于开始一个新职位的忠告
====
![](https://enterprisersproject.com/sites/default/files/styles/620x350/public/images/CIO_Leadership_3.png?itok=QWUGMw-V)
我目前的几个月在一家十分受人尊敬的基于云的技术公司担任新的 CIO 一职。我的首要任务之一就是熟悉组织的人、文化和当务之急的事件。
作为这一目标的一部分,我访问了所有主要的网站。而在印度,上任不到两个月时,我被问道:“你打算做什么?你的计划是什么?” 我回答道,这个问题不会让经验丰富的 CIOs 感到吃惊,我现在仍然处于探索模式,我在做的主要是聆听和学习。
我从来没有在入职时制定一份蓝图说我要做什么。我知道一些 CIOs 拥有一本关于他要怎么做的”剧本“。他会煽动整个组织将他的计划付诸行动。
是的,在有些地方是完全崩坏了并无法发挥作用的情况下,这种行动可能是有意义的。但是,当我进入到一个公司时,我的策略是先开始一个探索的过程。我不想带入任何先入为主的观念,比如什么事应该是什么样子的,哪些工作和哪些是有冲突的,而哪些不是。
以下是我作为新任命的领导人的指导原则:
### 了解你的人
这意味着建立关系,它包括你的 IT 职员,你的客户和你的销售人员。他们的清单上最重要的是什么?他们想要你关注什么?什么产品受到好评?什么产品不好?客户体验是怎样的?了解如何帮助每一个人变得更好将决定你提供服务的方式。
如果你的部门就像我的一样,是分布在几层楼中的,你可以考虑召开一个见面会,利用午餐或者小型技术研讨会的时间,让大家可以进行自我介绍并讨论下他们正在进行的工作,如果他们愿意的话还可以分享一些他们的家庭小故事。如果你有一个公开的办公室政策,你得确保每一个人都很好的了解它了。如果你有跨国跨州的的员工,你应该尽快的去拜访一下。
### 了解你的产品和公司文化
来到 Adobe 后最让我震惊的是我们的产品组合是如此的广泛。我们有一个横贯三个云的提供解决方案和服务的平台——Adobe 创新云、文档云和营销云——和对每一个产品的丰富的组合。除非你去了解你的产品和学会如何为他们提供支持,否则你永远也不知道你的新公司有着多么多的机会。在 Adobe 我们给我们的零号客户使用许多数字媒体和数字市场解决方案,所以我们可以将我们的第一手经验分享给我们的客户。
### 了解客户
从很早开始,我们就收到客户的会面请求。与客户会面是一种很好的方式来启发你对 IT 机构未来的的思考,包括各种我们可以改进的地方,如技术、客户和消费者
### 对未来的计划
作为一个新上任的领导者,我有一个全新的视角用以考虑组织的未来,而不会有挑战和障碍来干扰我。
CIOs 所需要做的就是推动 IT 进化到下一代。当我会见我的员工是,我问他们我们可以开始定位我们三到五年后的未来。这意味着开始讨论方案和当务之急的事。
从那以后,它使领导小组团结在一起,所以我们能够共同来组建我们的下一代体系——它的使命、愿景、组织模式和操作规范。如果你开始从内而外的改变,那么它会渗透到业务和其他你所做的一切事情上。
贯穿整个过程,我对他人都表现一种开明的态度,这不是一个自上而下的命令。也许我对我们当前要做的事有一个自己的看法,但是我们必须使看法保持一致,我们是一个团队,我们应该共同找出我们需要做的事。
--------------------------------------------------------------------------------
via: https://enterprisersproject.com/article/2016/9/adobes-new-cio-shares-leadership-advice-starting-new-role
作者:[Cynthia Stoddard][a]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://enterprisersproject.com/user/cynthia-stoddard

View File

@ -0,0 +1,140 @@
你必须了解的 Linux 基础网络命令
==================================================
![](https://itsfoss.com/wp-content/uploads/2016/06/Basic-Networking-Commands-Linux.jpg)
摘要:有抱负的 Linux 系统管理员和 Linux 狂热者必须知道的最重要而且基础的 Linux 网络命令合集。
在 Its FOSS 我们并非每天都谈论 Linux 的“命令行方面”。基本上,我更专注于 Linux 的桌面端。但你们读者中的一些人在内部调查(仅面向 It's FOSS newsletter 订阅者)中指出,你们也想学些命令行技巧。速查表也受大部分读者所喜欢和支持。
为此,我编辑了一个 Linux 中基础网络命令的列表。它并不是一个教你如何使用这些命令的教程,而是一个命令合集和他们的简短解释。所以,如果你已经使用过这些命令,你可以用它来快速记住命令。
你可以把这个网页添加为书签以便快速查阅,或下载这些命令的 PDF 版本以便离线使用。
当我还是通信系统工程专业的学生的时候我就有这个 Linux 网络命令的列表了。它帮助我在计算机网络课程获得了高分。希望它也能以同样的方式帮助你。
> 独家内容:[下载 Linux 网络命令速查表][1] 以便将来查阅。你可以打印或保存它以便离线查看。
### Linux 基础网络命令列表
我在计算机网络课程上使用 FreeBSD不过这些 UNIX 命令应该也能在 Linux 上同样工作。
#### 连通性
- __ping <host\>__:发送 ICMP echo 消息(一个包)到主机。这可能会不停地发送直到你按下 Control-C。Ping 通意味着一个包从你的机器通过 ICMP 发送出去,并在 IP 层回显。Ping 告诉你另一个主机是否在运行。
- __telnet <host\> [port]__:与主机在指定的端口通信。默认的 telnet 端口是 23。其它一些常用的端口是
7 —— echo 端口
25 —— SMTP用于发送邮件
79 —— Finger译注[维基百科 - Finger protocal](https://en.wikipedia.org/wiki/Finger_protocol)),提供该网络下其它用户的信息
按 Control-] 以退出 telnet。
#### ARP
ARP 用于将 IP 地址转换为以太网地址。Root 用户可以添加和删除 ARP 记录。当 ARP 记录被污染或者错误时删除他们会有用。Root 显式添加的 ARP 记录是永久的 —— 代理设置的也是。ARP 表保存在内核中动态地被操作。ARP 记录会被缓存,通常在 20 分钟后失效并被删除。
- __arp -a__:打印 ARP 表
- __arp -s <ip_address\> <mac_address\> [pub]__:添加一条记录到表中
- __arp -a -d__:删除 ARP 表中的所有记录
#### 路由
- __netstat -r__:打印路由表。路由表保存在内核中,用于 IP 层路由包到非本地网络。
- __route add__route 命令用于向路由表添加静态(手动输入而非动态)路由路径。所有从该 PC 到那个 IP/子网的流量都会经由指定的网关 IP。它也可以用来设置一个默认路由。例如在 IP/子网处使用 0.0.0.0,就可以发送所有包到特定的网关。
- __routed__:控制动态路由的 BSD 守护程序。开机时启动。它运行 RIP 路由协议。只有 root 用户可用。没有 root 权限你不能运行它。
- __gated__gated 是另一个使用 RIP 的路由守护进程。它同时支持 OSPF、EGP 和 RIP 协议。只有 root 用户可用。
- __traceroute__:用于跟踪 IP 包的路由。它每次发送包时都把跳数加 1从而使得从源地址到目的地之间的所有网关都会返回消息。
- __netstat -rnf inet__:显示 IPv4 的路由表
- __sysctl net.inet.ip.forwarding=1__:启用包转发(把主机变为路由器)
- __route add|delete [-net|-host] <destination\> <gateway\>__:(如 `route add 192.168.20.0/24 192.168.30.4`)添加一条路由
- __route flush__:删除所有路由
- __route add -net 0.0.0.0 192.168.10.2__:添加一条默认路由
- __routed -Pripv2 -Pno_rdisc -d [-s|-q]__:运行 routed 守护进程,使用 RIPv2 协议,不启用 ICMP 自动发现,在前台运行,供给模式或安静模式。
- __route add 224.0.0.0/4 127.0.0.1__:定义 RIPv2 使用的路由(译注:翻译存疑)
- __rtquery -n <host\>__(译注:增加了 host 参数):查询指定主机上的 RIP 守护进程(手动更新路由表)
#### 其它
- __nslookup__:向 DNS 服务器查询,将 IP 转为名称,或反之。例如,`nslookup facebook.com` 会给出 facebook.com 的 IP。
- __ftp <host\> [port]__(译注:原文中 water 应是笔误):传输文件到指定主机。通常可以使用 login="anonymous" , p/w="guest" 登录。
- __rlogin -l <host\>__(译注:添加了 host 参数):使用类似 telnet 的虚拟终端登录到主机
#### 重要文件
- __/etc/hosts__域名到 IP 地址的映射
- __/etc/networks__网络名称到 IP 地址的映射
- __/etc/protocols__协议名称到协议编号的映射
- __/etc/services__TCP/UDP 服务名称到端口号的映射
#### 工具和网络性能分析
- __ifconfig <interface\> <address\> [up]__:启动接口
- __ifconfig <interface\> [down|delete]__:停止接口
- __ethereal &__:在后台打开 `ethereal` 而非前台
- __tcpdump -i -vvv__:抓取和分析包的工具
- __netstat -w [seconds] -I [interface]__:显示网络设置和统计信息
- __udpmt -p [port] -s [bytes] target_host__:发送 UDP 流量
- __udptarget -p [port]__:接收 UDP 流量
- __tcpmt -p [port] -s [bytes] target_host__:发送 TCP 流量
- __tcptarget -p [port]__:接收 TCP 流量
#### 交换机
- __ifconfig sl0 srcIP dstIP__:配置一个序列接口(在此前先执行 `slattach -l /dev/ttyd0`,此后执行 `sysctl net.inet.ip.forwarding=1`
- __telnet 192.168.0.254__:从子网中的一台主机访问交换机
- __sh ru____show running-configuration__:查看当前配置
- __configure terminal__:进入配置模式
- __exit__:进入低级配置模式(译注:翻译存疑)
#### VLAN
- __vlan n__:创建一个 ID 为 n 的 VLAN
- __no vlan N__:删除 ID 为 n 的 VLAN
- __untagged Y__:添加端口 Y 到 VLAN n
- __ifconfig vlan0 create__:创建 vlan0 接口
- __ifconfig vlan0 vlan ID vlandev em0__:连接 vlan0 接口到 em0 之上(译注:翻译存疑),并设置标记为 ID
- __ifconfig vlan0 [up]__:启用虚拟接口
- __tagged Y__:为当前 VLAN 的端口 Y 添加标记帧支持
#### UDP/TCP
- __socklab udp__:使用 UDP 协议运行 `socklab`
- __sock__:创建一个 UDP 套接字,等效于输入 `sock udp``bind`
- __sendto <Socket ID\> <hostname\> <port #\>__:发送数据包
- __recvfrom <Socket ID\> <byte #\>__:从套接字接收数据
- __socklab tcp__:使用 TCP 协议运行 `socklab`
- __passive__:创建一个被动模式的套接字,等效于 `socklab``sock tcp``bind``listen`
- __accept__:接受进来的连接(可以在发起进来的连接之前或之后执行)
- __connect <hostname\> <port #\>__:等效于 `socklab``sock tcp``bind``connect`
- __close__:关闭连接
- __read <byte #\>__:从套接字中读取 n 字节
- __write__:(例如,`write ciao`、`write #10`)向套接字写入 "ciao" 或 10 个字节
#### NAT/防火墙
- __rm /etc/resolv.conf__:禁止地址解析,保证你的过滤和防火墙规则正确工作
- __ipnat -f file_name__:将过滤规则写入文件
- __ipnat -l__:显示活动的规则列表
- __ipnat -C -F__:重新初始化规则表
- __map em0 192.168.1.0/24 -> 195.221.227.57/32 em0__:将 IP 地址映射到接口
- __map em0 192.168.1.0/24 -> 195.221.227.57/32 portmap tcp/udp 20000:50000__:带端口号的映射
- __ipf -f file_name__:将过滤规则写入文件
- __ipf -F -a__:重置规则表
- __ipfstat -I__:在过滤的包上允许访问某些信息(译注:翻译存疑),也包括活动的过滤规则
希望这份基础的 Linux 网络命令合集对你有用。问题和建议总是受欢迎的。
--------------------------------------------------------------------------------
via: https://itsfoss.com/basic-linux-networking-commands
作者:[Abhishek Prakash][a]
译者:[bianjp](https://github.com/bianjp)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[1]: https://drive.google.com/open?id=0By49_3Av9sT1cDdaZnh4cHB4aEk

View File

@ -13,7 +13,21 @@ tar 命令语法如下:
下面列举 tar 命令中一些常用的选项:
![](http://www.linuxtechi.com/wp-content/uploads/2016/09/tar-command-options.jpg)
```
--delete : 从归档文件 (而非磁带) 中删除
-r, --append : 将文件追加到归档文件中
-t, --list : 列出归档文件中包含的内容
--test-label : 测试归档文件卷标并退出
-u, --update : 将已更新的文件追加到归档文件中
-x, --extract, --get : 释放归档文件中文件及目录
-C, --directory-DIR : 执行归档动作前变更工作目录到 DIR
-f, --file=ARCHIVE : 指定 (将要创建或已存在的) 归档文件名
-j, --bip2 : 对归档文件使用 bzip2 压缩
-J, --xz : 对归档文件使用 xz 压缩
-p, --preserve-permissions : 保留原文件的访问权限
-v, --verbose : 显示命令整个执行过程
-z, gzip : 对归档文件使用 gzip 压缩
```
注 : 在 tar 命令选项中的连接符 ( ) 是可选的 (LCTT 译注:不用 - 也没事)。