---
title: "  linux 清除文件内容命令(转)"
author: "foolraty"
date: "2011-04-25T09:22:22Z"
tags: []
categories: ["操作系统"]
slug: "linux"
draft: false
lastmod: "2011-04-25T09:22:22Z"
id: 1015272
url: "https://foolraty.iteye.com/blog/1015272"
---

1.echo "" &gt; file

2.echo &gt; file

3.cp /dev/null file

4.cat /dev/null &gt;file