Next: 3.9 File Permissions Up: 3.8 UNIX Plumbing Previous: 3.8.3 Using pipes

## 3.8.4 Non-destructive redirection

Using ```>`'' to redirect output to a file is destructive: in other words, the command

`/home/larry/papers# ls > file-list`

overwrites the contents of the file `file-list`. If, instead, you redirect with the symbol ```>>`'', the output will be appended to the named file, instead of overwriting it.

`/home/larry/papers# ls >> file-list`

will append the output of the `ls` command to `file-list`.

Just keep in mind that redirection and using pipes are features provided by the shell---the shell provides this handy syntax using ```>`'' and ```>>`'' and ```|`''. It has nothing to do with the commands themselves, but the shell.

Next: 3.9 File Permissions Up: 3.8 UNIX Plumbing Previous: 3.8.3 Using pipes