In the section "Installing Portage", the Gentoo installation docs say:
# tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usrWhat does this command do?
3 Answers
Tar is used to handle archives (historically saved on tapes).
- The
xtells it to extract files from the archive vstands for verbosejfor bzip2 archivefindicates the file name- finally:
Ctells it to change directory (so the package content will be unpacked there)
See also man tar.
If you ever need to know what a parameter does again, try to read the man first. The command man tar, and then doing /-C will get you to the section describing what -C stands for, which in this example represents 'change directory' (i.e. sends the results of the unpacking to /mnt/gentoo/usr).
It unpacks /mnt/gentoo/portage-latest.tar.bz2 in /mnt/gentoo/usr/