|
|
发表于 2004-10-24 15:53:16
|
显示全部楼层
Let's say you have a file called 'messages' which was created like this:
$ ls -lhF | tee messages
Now you don't want to keep the content of the file but you do want to keep the file itself for later use, you may open the file with an editor, select all and delete; another way to do this is to give the following cat command to truncate the file to zero length while preserving the ownership and permissions of the file:
$ cat /dev/null > messages |
|