Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a FreeBSD user I was curious since I wouldn't want to learn to depend on an option only to find it doesn't exist in version n-1, and today I learned that FreeBSD's tar is contributed code from libarchive and not an in-tree thing like I assumed! https://github.com/freebsd/freebsd/blob/master/usr.bin/tar/M...

Looks like that option got merged in 2013: https://github.com/freebsd/freebsd/blame/24ac2fb6ec0610e60ac...

The textual libarchive changelog isn't super clear on it, and I didn't feel like digging further, but appears to have been introduced some time between libarchive 3.0.4 in 2012 and libarchive 3.1.2 in 2013: https://github.com/freebsd/freebsd/commit/366f42737cba40ceb2...



This got me digging a little further, and (as a consequence) I just learned something new and fun: the current libarchive-based BSD tar can create and extract a ton [1] of other formats, including ZIP, RAR, and 7Zip files!

That'll save me some time next time I need to extract one at the command line; I always end up having to look at unzip's man page to make sure it's actually going to do what I want, and the 7zip command line utility's kind of funky (and not installed by default most places). But 'tar -xvf filename' is permanently burned into my mind and pretty much always does exactly what I want.

[1] https://www.freebsd.org/cgi/man.cgi?query=libarchive-formats...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: