# gtar's --remove-files option



## Abacus (Sep 30, 2009)

Hi all,

Can anyone think of something equivalent to

```
gtar --remove-files -czf somedir/something.tgz somedir/something.*
```
that uses nothing but FreeBSD's base install commands (as in, nothing from ports)?

- Steven


----------



## vivek (Sep 30, 2009)

Naa, you have no choice but  install it from ports.


----------



## Abacus (Sep 30, 2009)

Really?

Well, I don't even care if the archive is of a different format. I just need something that creates a compressed archive of some files, then deletes whatever it archived. Is there nothing like this on a stock install of FreeBSD?


----------



## DutchDaemon (Sep 30, 2009)

[cmd=]tar cvzf somedir.tar.gz /some/dir && rm -rf /some/dir[/cmd] 

All part of the base system. Even &&.


----------

