Просто укажите на каталог, который вы хотите сжать. Вот пример:
You use the command :
$ tar -czf test.tar.gz test/
When you unpack you get the same directory back.
$ tar -xvf test.tar.gz
This assumes that the test/
directory lies in the same directory where you ran the command. You can use -C
to point to a different directory by path as your used earlier.
In case you are referring to the .
and ..
in the output of ls
command, they are going to be there for any directory. They refer to the current directory and parent directory, repectively. Read more здесь .