Skipping the first directory in a .tar file
Lots of the compressed files I download come in the form "project-name-1.2.3.tar.gz", and contain a directory within them named in the same format, so when you untar it creates a directory like "project-name-1.2.3", with all of the project files below it. As most of the time I seem to be already working in a new directory where I want the file to untar, I don't want to have to bother about moving the contents up a level and then deleting the old directory. The tar switch
--strip-components=1 addresses this problem by removing the first directory on extraction.
man tar | grep strip-components .