Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
vorakl
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
1.
▲
by
vorakl
2y ago
Then, this explains why. BTW, this is an expected Shell behavior, specified in the POSIX standard: If a filename begins with a <period> ( '.' ), the <period> shall be explicitly matched by using a <period>
2.
▲
by
vorakl
2y ago
This is an interesting one. What was the version of tar? Was it gnu tar? I wonder, how did you create that archive? I'm asking this because I was trying to reproduce the same situation and everything seems to be working fine: $ tar
3.
▲
by
vorakl
2y ago
I don't recall ever seeing this approach with sudo. Is it really becoming popular? It used to be just bash, e.g. `curl ... | bash`. But now there is nothing stopping you from putting sudo in that bash script and expecting with a high p
4.
▲
by
vorakl
2y ago
I asked about options for GNU tar because there is a bit of strange behavior. To add absolute paths to an archive, there is "-P" option, and man says it works only for creating archives: "Don't strip leading slashes fr
5.
▲
by
vorakl
2y ago
--no-overwrite-dir (Preserve metadata of existing directories) This is a really good point! It solves the main problem. I'll add it to the article. Although that's what, unfortunately, is set by default (at least in GNU tar): --ov
6.
▲
by
vorakl
2y ago
How do you create a tar archive that "contains absolute paths"?
7.
▲
by
vorakl
2y ago
Yes, but someone has to do the dirty work ;)
8.
▲
by
vorakl
2y ago
This is a good and safe practice. And I think most people do it this way after cleaning up the mess of a badly built tarball at least once :)
9.
▲
How to destroy your OS with tar
(vorakl.com)
98 points
by
vorakl
2y ago
|
61 comments
10.
▲
by
vorakl
2y ago
I wonder what is the origin of this "/bin/sh" and why it's often assumed that sh is in /bin by default. The standard is pretty clear about that: "Applications should note that the standard PATH to the shel
11.
▲
by
vorakl
2y ago
Certainly true. I just referred to this definition "2.4 Other Language-Related Specifications POSIX.1-2017 is currently specified in terms of the shell command language and ISO C. Bindings to other programming languages are being devel
12.
▲
by
vorakl
2y ago
Interesting! I just wonder... How would you do a conditional branching in sed?
13.
▲
by
vorakl
2y ago
It's a good point! I've addressed it. I referred here to the following definition: "2.4 Other Language-Related Specifications POSIX.1-2017 is currently specified in terms of the shell command language and ISO C. Bindings to o
14.
▲
by
vorakl
2y ago
> the Zephyr RTOS which claimed to have some kind of posix compliance... The work is still in progress. It's also important to note, that Zephyr is intended to run on resource-constrained systems. There is not much logic in impleme
15.
▲
by
vorakl
2y ago
Thanks for pointing this out! I have addressed this important detail.
16.
▲
A few facts about POSIX
(vorakl.com)
114 points
by
vorakl
2y ago
|
54 comments