Can't read process output with cat and tailtail output of program`tail` and append in onelinerWriting to multiple files with catArrow keys with cat / readUbuntu Service with tail not startingGiving cat output to rm
Heavy condensation inside car during winter. Tried multiple things, but no results!
The lecturer supposed to grade my presentation fell asleep while I held it. Should I complain?
Draw a line in the center of a chessboard
I'm from Mumbai, India. I want to travel to Europe as a tourist but my salary is low ( €190/month)
A feasible and efficient method of fast global travel?
How to negotiate an offer if I'm not actually going to accept it
How do HK restaurants keep white scallops that they wok fry? No sear marks!
Why does Rome municipality seem to have a hard time maintaining the city?
Single word for being half in this world, half in some other spooky plane of existence
How to translate "cocotte en papier" in English?
Fewest Chess Pieces
Why does "Endgame" have a different time travel theory?
Continuous functions taking uncountably many values countably often
What is QED about "Cavity QED"?
Is there a coup going on in Bolivia?
20 cards with no Set
In TDD, should I add unit tests to refactored code?
Does a small cup of coffee result in a 45% reduced blood flow to the brain?
Is 忍者/忍び also used for women?
How do shared hosting providers know you own a domain when you point the DNS to their server?
Why can "bubo" ("owl") be feminine or masculine?
What happens when a ceramic bypass or decoupling capacitor goes bad?
Why would a life-insurance company agree to a 20-year guaranteed life annuity which is expected to pay out more than the principal?
Expand a recursive pattern
Can't read process output with cat and tail
tail output of program`tail` and append in onelinerWriting to multiple files with catArrow keys with cat / readUbuntu Service with tail not startingGiving cat output to rm
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I have a simple example of writing to stdout
:
import datetime
import time
if __name__ == '__main__':
while True:
print('time is '.format(datetime.datetime.now().time()))
time.sleep(5)
Then I did:
python main.py & echo $!
to run my process and get its PID.
My purpose is reading from stdout
of my current process above, but all of these commands just freeze console and don't show stdout
content
sudo tail -f /proc/15608/fd/1my console
sudo cat /proc/15608/fd/1
Notice strace
works perfectly:
sudo strace -e write=1 -e trace=write -p 15608
But it gives me too much useless text.
My question: why don't cat
(and tail
) work properly and freeze my console? Could somebody explain me why it happens?
command-line bash
add a comment
|
I have a simple example of writing to stdout
:
import datetime
import time
if __name__ == '__main__':
while True:
print('time is '.format(datetime.datetime.now().time()))
time.sleep(5)
Then I did:
python main.py & echo $!
to run my process and get its PID.
My purpose is reading from stdout
of my current process above, but all of these commands just freeze console and don't show stdout
content
sudo tail -f /proc/15608/fd/1my console
sudo cat /proc/15608/fd/1
Notice strace
works perfectly:
sudo strace -e write=1 -e trace=write -p 15608
But it gives me too much useless text.
My question: why don't cat
(and tail
) work properly and freeze my console? Could somebody explain me why it happens?
command-line bash
This might answer some of your questions: Why can't Itail -f /proc/$pid/fd/1
?
– steeldriver
Aug 12 at 1:36
add a comment
|
I have a simple example of writing to stdout
:
import datetime
import time
if __name__ == '__main__':
while True:
print('time is '.format(datetime.datetime.now().time()))
time.sleep(5)
Then I did:
python main.py & echo $!
to run my process and get its PID.
My purpose is reading from stdout
of my current process above, but all of these commands just freeze console and don't show stdout
content
sudo tail -f /proc/15608/fd/1my console
sudo cat /proc/15608/fd/1
Notice strace
works perfectly:
sudo strace -e write=1 -e trace=write -p 15608
But it gives me too much useless text.
My question: why don't cat
(and tail
) work properly and freeze my console? Could somebody explain me why it happens?
command-line bash
I have a simple example of writing to stdout
:
import datetime
import time
if __name__ == '__main__':
while True:
print('time is '.format(datetime.datetime.now().time()))
time.sleep(5)
Then I did:
python main.py & echo $!
to run my process and get its PID.
My purpose is reading from stdout
of my current process above, but all of these commands just freeze console and don't show stdout
content
sudo tail -f /proc/15608/fd/1my console
sudo cat /proc/15608/fd/1
Notice strace
works perfectly:
sudo strace -e write=1 -e trace=write -p 15608
But it gives me too much useless text.
My question: why don't cat
(and tail
) work properly and freeze my console? Could somebody explain me why it happens?
command-line bash
command-line bash
asked Aug 11 at 22:05
SergeySergey
111 bronze badge
111 bronze badge
This might answer some of your questions: Why can't Itail -f /proc/$pid/fd/1
?
– steeldriver
Aug 12 at 1:36
add a comment
|
This might answer some of your questions: Why can't Itail -f /proc/$pid/fd/1
?
– steeldriver
Aug 12 at 1:36
This might answer some of your questions: Why can't I
tail -f /proc/$pid/fd/1
?– steeldriver
Aug 12 at 1:36
This might answer some of your questions: Why can't I
tail -f /proc/$pid/fd/1
?– steeldriver
Aug 12 at 1:36
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1165053%2fcant-read-process-output-with-cat-and-tail%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1165053%2fcant-read-process-output-with-cat-and-tail%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This might answer some of your questions: Why can't I
tail -f /proc/$pid/fd/1
?– steeldriver
Aug 12 at 1:36