How do I tar a directory of files and folders without including the directory itself?

I typically do: tar -czvf my_directory.tar.gz my_directory What if I just want to include everything (including any hidden system files) in my_directory, but not the directory itself? I don’t want: my_directory — my_file — my_file — my_file I want: my_file my_file my_file 20 Answers 20 Use the -C switch of tar: tar -czvf my_directory.tar.gz -C … Read more