Hello all,
I have a question, any help would be much appreciated.
Say I have a bunch of files
among many others in the same folder, and I want to make a tar.gz file of these files. If I remember correctly, I could do something like
Code:
tar -czf my_compressed_file.tar.gz file1 file2 file3
but I would rather put everything in a folder inside the compressed file. In other words the contents of the compressed file should be
Code:
my_directory
my_directory/file1
my_directory/file2
my_directory/file3
Is there a way to do that with one command and without creating temporary folders and stuff?
Finally, say I have my compressed file as I want, and then I decide that I want to put file4 inside the already created folder my_directory of the compressed file. Can I do that without using many commands again?
Many thanks in advance
Bookmarks