Say I have file named
ugly_name.tar, which when extracted, becomes
ugly_name directory. What command can I use such that the resulting directory name is
This should work:
Note that this is not really portable. GNU tar and at least some of the BSD tars have the
The dumb way of doing this would work pretty much everywhere though.
If you don't know the name of the toplevel directory, you can still use this method, though you might prefer