Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Posts by Kamil Maciorowski‭

8 posts
77%
+5 −0
Q&A When a command takes filenames as argument, how can I avoid creating temporary files?

This other answer uses process substitutions. Not every shell supports this feature. If your OS provides pathnames for file descriptors (/dev/fd/N or /proc/self/fd/N) then you can use them to achie...

posted 11mo ago by Kamil Maciorowski‭

Answer
77%
+5 −0
Q&A How can I use SIGUSR1 or SIGUSR2 without risk of terminating the process?

If you are about to start the tool Start the tool from a process that already blocks or ignores SIGUSR1 and/or SIGUSR2 and let the tool inherit these settings. A blocked signal, when generated, w...

posted 11mo ago by Kamil Maciorowski‭  ·  edited 11mo ago by Kamil Maciorowski‭

Answer
77%
+5 −0
Q&A Documentation for double asterisk glob expansion

While * belongs to the POSIX standard, ** is an extension. You are right it's not in man 7 glob. Tools that treat ** specially (i.e. not as * simply followed by *) tend to agree what it means, but ...

posted 8mo ago by Kamil Maciorowski‭

Answer
75%
+4 −0
Q&A Reverse shell with named pipe and netcat

I'm not sure which exact fragment, functionality or aspect is problematic to you. Here I will make points (paragraphs) about what I used to struggle to understand, or about what I suspect may be no...

posted 11mo ago by Kamil Maciorowski‭  ·  edited 11mo ago by Kamil Maciorowski‭

Answer
75%
+4 −0
Q&A How can I use SIGUSR1 or SIGUSR2 without risk of terminating the process?

SIGUSR1 and SIGUSR2 are user-defined signals. Imagine there is a tool designed to do something useful upon receiving one or the other. The problem is the default action for these signals is Term (...

1 answer  ·  posted 11mo ago by Kamil Maciorowski‭  ·  last activity 11mo ago by Kamil Maciorowski‭

75%
+4 −0
Q&A Higher-order functions in Bash?

Do not embed {} in the shell code. If your {} gets expanded (by xargs) to ./rogue name $(reboot).txt then bash -c 'my-func "{}"' _ will become bash -c 'my-func "./rogue name $(reboot).txt"' _ a...

posted 8mo ago by Kamil Maciorowski‭  ·  edited 8mo ago by Kamil Maciorowski‭

Answer
75%
+4 −0
Q&A How to overwrite each line of STDOUT with the next one?

This other answer tries to truncate each line to make it fit the width of the terminal. It's hard to do this reliably because e.g. a tab character counts as one, but it looks like several spaces; o...

posted 7mo ago by Kamil Maciorowski‭  ·  edited 7mo ago by Kamil Maciorowski‭

Answer
66%
+2 −0
Q&A What are the concrete security risks of forcibly terminating a process?

What security risks can be introduced this way, and how? Consider the following scenario: A legitimate server listens on some network port. Usually¹ no other process can listen on the por...

posted 1mo ago by Kamil Maciorowski‭

Answer