title: how to prevent overwrite existing files when using tar command
body: <p>I made a mistake that forgot to assign argument of the file name when using <code>tar</code> command like below:</p>
  
  <pre><code>[john@foobar foo]$ ll
  total 0
  -rw-rw-r-- 1 john john 0  7月  4 19:20 2018 file1
  -rw-rw-r-- 1 john john 0  7月  4 19:20 2018 file2
  -rw-rw-r-- 1 john john 0  7月  4 19:20 2018 file3
  [john@foobar foo]$ tar -cvzf file1 file2 file3
  file2
  file3
  [john@foobar foo]$ ll
  total 4
  -rw-rw-r-- 1 john john 130  7月  4 19:21 2018 file1
  -rw-rw-r-- 1 john john   0  7月  4 19:20 2018 file2
  -rw-rw-r-- 1 john john   0  7月  4 19:20 2018 file3
  </code></pre>
  
  <p>When forget to assign archive file name, <code>tar</code> overwrites and creates the archive <code>file1</code>.</p>
  
  <p>I checked <code>man tar</code>, but it seems there is no option such as <code>cp</code> shows a prompt when same name file already exists.</p>
  
  <p>To create a foolproof script is a possible way? </p>