# make the test directory structure mkdir -p food/fruit/citrus # # create the files lemon.txt and lime.txt with your favorite editor # vi, vim, nano, emacs, mousepad # # create the backup file $ tar cf myfood.tar food/fruit/citrus/*.txt # # display the contents of the backup file $ tar tf myfood.tar food/fruit/citrus/lemon.txt food/fruit/citrus/lime.txt # # remove the original files $ rm food/fruit/citrus/*.txt # # restore the files from the tar file $ tar xf myfood.tar # # display the files $ ls food/fruit/citrus lemon.txt lime.txt # # delete the files from the nested directory $ rm food/fruit/citrus/*.txt # # restore the files to the CURRENT directory $ tar xf myfood.tar --strip-components 3