Questions tagged [stdout]

71 questions
255
votes
6 answers

How to see stdout of ansible commands?

How do I see stdout for ansible-playbook commands? -v only shows ansible output, not the individual commands. It would be great if I could figure out how to do this immediately, so if something fails or hangs I can see why. e.g. - name: print to…
QuinnBaetz
  • 2,659
  • 2
  • 12
  • 3
68
votes
8 answers

Is there a way to redirect output to a file without buffering on unix/linux?

I have a long running batch process that outputs some debug and process information to stdout. If I just run from a terminal I can keep track of 'where it is' but then the data gets too much and scrolls off the screen. If I redirect to output to a…
James Dean
  • 801
  • 1
  • 7
  • 5
51
votes
2 answers

Windows: redirect stdout and stderror to nothing

I have a command I am running produces a ton of output, I want to silence the output without writing to a file. I have used the following to send all output to a file: command > out.txt 2>&1 ... but again I don't want any file output: command >…
Alec Gorge
  • 627
  • 1
  • 5
  • 9
15
votes
4 answers

How can I capture output from LFTP? (Output not written to STDOUT or STDERR?)

I would like get access to progress information from lftp. Currently, I'm using curl like so: curl http://example.com/file -o file -L 2> download.log This writes curl's progress information to the download.log file, which I can tail to get…
jondahl
  • 153
  • 1
  • 1
  • 4
12
votes
1 answer

Ansible display realtime shell stdout

I want see the realtime shell stdout, instead of registering in a variable and then display once it is completed. Example Playbook - test.yml - name: Testing RUN Shell Command hosts: localhost connection: local tasks: - name: Runnig…
Veerendra K
  • 313
  • 3
  • 4
  • 11
11
votes
4 answers

Is there anyway to get msiexec to echo to stdout instead of logging to a file

As part of a continuous delivery pipeline I'd like to install an msi on a given machine. msiexec plus psexec does this perfectly, but it seems that msiexec can only log to a file and I need it to log to stdout/stderr. Right now, to get the output…
mrmrcoleman
  • 111
  • 1
  • 4
11
votes
2 answers

Completely silent robocopy

I'm trying to robocopy some files silently. Right now, I have robocopy putting everything into a log file, which is fine, but after it finished, Log File: C:\ is printed. My command looks like this: robocopy source destination…
CoV
  • 111
  • 1
  • 1
  • 4
8
votes
4 answers

Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?

Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to stdout instead? Or is this irrelevant given that…
Rio
  • 335
  • 2
  • 11
7
votes
3 answers

How can I redirect an already running process's stdout/stderr?

(Running on an Ubuntu 10.04 64-bit server) Yesterday, I made the mistake of starting a process (which I didn't realize was going to take several days to run) over SSH without using screen. I've spent all day today trying to figure out some way that…
nonoitall
  • 173
  • 1
  • 3
6
votes
1 answer

SSHd logs in Docker container not shown by `docker logs`

When using CMD ["/usr/sbin/sshd", "-D"] in a Dockerfile, docker logs does not show the logging: cat > Dockerfile.stdout <
Willem
  • 177
  • 4
  • 13
5
votes
1 answer

systemd process stdout/stderr

When I run the service manually, it logs something when it starts. But I cannot find this log anywhere when it starts as systemd process. journalctl -u only shows the records about the service starting and stopping, not the actual service…
esp
  • 151
  • 1
  • 5
5
votes
2 answers

What is the meaning of the "/dev/null 2>&1" in a Cronjob entry?

Can someone explain to me what is the meaning of "2>&1" doing here in the below cron job 0 23 * * * wget -q -O /dev/null "https://example.com/index.php" > /dev/null 2>&1
mahen3d
  • 4,342
  • 14
  • 36
  • 57
4
votes
1 answer

BASH: alternatives to coproc

I have some scripts which use coproc to control stdout/stdin of subprocesses. Unfortunately, coproc was introduced in Bash 4.0, and on many systems I use, there is an earlier versions of bash. Are there any alternatives to coproc?
4
votes
2 answers

From log file into terminal in realtime

I'm on Ubuntu. Is it possible to open putty and watch as a log file updates right in terminal? Like if stdout would have been directed in terminal? For example I have one application's stdout and stderr directed into a file and want to watch how my…
Somebody
  • 364
  • 1
  • 6
  • 17
3
votes
3 answers

Grep regex Stdout to telnet

I'm trying to use grep to get a regex result and pipe the results on-the-fly to telnet running an open port to a node server. The grep received continuous, but varied in interval, commands from a program running, greps out a number then pipes that…
kirgy
  • 179
  • 11
1
2 3 4 5