PDA

View Full Version : gtar's --remove-files option


Abacus
September 30th, 2009, 04:04
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
September 30th, 2009, 07:14
Naa, you have no choice but install it from ports.

Abacus
September 30th, 2009, 07:22
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
September 30th, 2009, 10:57
tar cvzf somedir.tar.gz /some/dir && rm -rf /some/dir ;)

All part of the base system. Even &&.