4 ms·
Your mkcd script breaks for directories with spaces in their names; you've got to put $1 in quotes. Also, never heard of a tar bomb? =)
by foonamefoo 19y ago
Your mkcd script breaks for directories with spaces in their names; you've got to put $1 in quotes. Also, never heard of a tar bomb? =)
- dreish 19y agoIt works in Z shell, and breaks in Bash -- thanks, I didn't realize that. I don't see how -C protects against a tar bomb. Generally when I untar a tarball from a new source whose packaging habits I'm not familiar with, I tar tzvf it first.
- foonamefoo 19y ago-C protects if you create an empty directory and then use it as the argument to -C; saves you a command line cd and a cd back to where you were, though it doesn't save much if you use your mkcd command to make the directory. (I'm talking about GNU tar where any leading slash(es?) is stripped off of the path of any files in the tar (and .. is disabled))