I'm looking for a single line command or a script that archives 5 folders into .tar files (no gzip/bzip needed) in a certain directory and deletes the folders after a successful compression. It has to use the original folder name as file name for the archive too.
So far I've used the current command, which only does one directory per time:
tar -c directory > directory.tar && rm -rf directory
Thanks in advance.