Translations:A tutorial on 'tar'/77/en
Jump to navigation
Jump to search
To unpack or extract an archive, we use -x {for extract} option with -f {for file}; -v {for verbosity} can also be added. Let us extract the whole archive results.tar. If we want to extract it in the same directory, we have to make sure that there is no directory with this name otherwise the extracted data go to that directory. To avoid rewriting the data if the directory exists already, we redirect to extracted data to another directory by adding the option -C and making sure that the destination directory exists already or created before unpacking the archive. For example, we create a directory moved_results and extract the data from the archive results.tar to this directory.