---
title: "Linux常用命令收藏"
author: "c_c"
date: "2014-05-15T18:04:41Z"
tags: []
categories: ["操作系统"]
slug: "linux"
draft: false
lastmod: "2014-05-16T09:33:35Z"
id: 2067033
url: "https://waddy.iteye.com/blog/2067033"
---

**压缩与解压缩**

**在LINUX下想要直接压缩多个文件夹为tar.gz格式,该怎么办?**

压缩文件：tar czf xxxxx.tar.gz dir1 dir2 dir3

解压文件： tar zxvf xxxxx.tar.gz

其中 c 创建新的归档，z 归档类型为gzip

 

**远程拷贝文件**

scp xxxx.tar.gz server@192.168.1.2:/home/server/case

 

**查看目录大小**

du -sh xxxx