9951 explained code solutions for 126 technologies


cli-tarHow can I use the tar command in Unix to create archives in quiet mode?


The tar command in Unix can be used to create archives in quiet mode by using the -q or --quiet flag. This flag will suppress the output of the command, which is useful for redirecting and piping the output of the command.

Example code

tar -cf archive.tar --quiet file1 file2 file3

Code explanation

  • tar - the command to create archives
  • -c - the flag to create an archive
  • -f - the flag to specify the name of the archive
  • --quiet - the flag to suppress the output of the command
  • file1, file2, file3 - the files to be included in the archive

Helpful links

Edit this code on GitHub