Skip to main content

Questions tagged [stderr]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

`hdfs dfs -rm` sends normal output to `stderr`?

For context : $ hadoop version Hadoop 2.7.3.2.6.5.0-292 What I did : $ hdfs dfs -rm -safely -r '/path/to/data/year=2022/month=10' 1>file1.log 2>file2.log $ ls -l file*log -rw-r--r-- 1 userName ...
Httqm's user avatar
  • 297
0 votes
1 answer
956 views

How can I connect standard output and error of a systemd service to a file with a date in the path?

I would like to run a server process under systemd, and append its standard output and error to a file, where the file path has a date in it, like this: /initech/logs/tps-report-app/sales/2023/09/11/...
Tom Anderson's user avatar
0 votes
1 answer
3k views

Send STDERR to console and file, STDOUT to file only

I have some script with STDOUT and STDERR output. By default, both STDOUT and STDERR goes to console: ./script.sh I can redirect STDOUT to file, leaving STDERR output in console: ./script.sh > log....
AntonioK's user avatar
  • 651
1 vote
1 answer
2k views

how to see the verbose output of a process that is running that writes to a file (shred)

I am running the shred command to securely wipe some storage. I would like to see its progress, but have lost the ssh terminal that was running the command. Is there a way that I can use to see the ...
miller the gorilla's user avatar
1 vote
0 answers
76 views

assign result and status code from wget to variables

Can I get the response and status code and assign them to variables? # wget https://www.google.com --quiet --server-response 1> >(body=$(</dev/stdin)) 2> >(grep HTTP | awk '{print $2}' |...
Richard Barraclough's user avatar
7 votes
2 answers
34k views

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>&...
mahen3d's user avatar
  • 4,612
2 votes
1 answer
760 views

Linux shell: Pipe stderr and stdout to one file AND to individual files at the same time (using tee?)

I would like to form a pipe-stream that captures stdout to one file and stderr to another file AND both in a third file (so also the complete terminal output is in one file) somehow like this: process ...
user611005's user avatar
0 votes
2 answers
1k views

How to suppress `gcloud compute firewall-rules update` output when there are no errors?

I have a bash script running as cron job which has some gcloud commands in it. eg. gcloud compute firewall-rules update allow-ssh--source-ranges=$(echo "${mylocations[@]}" | tr ' ' ',') I ...
paradroid's user avatar
  • 888
0 votes
1 answer
2k views

Unable to write to `stderr` or `stdout` from Kubernetes pod to pod logs

I'm trying to debug why my application logs aren't being picked up by Promtail for ingestion into Loki. In order to exclude the complexities of my PHP application logging being the culprit, I'm ...
Alex's user avatar
  • 101
1 vote
1 answer
180 views

No timestamp on standard error

Using fping and redirecting stout and stderr to the same file. fping -lDf IPlist >IPoutput 2>&1 The "host unreachable" error messages in the file have no timestamps. How do I get ...
jonathan_whitelist's user avatar
-1 votes
1 answer
137 views

stdout and stderr from bash execution to other machine?

Is it possible to send stderr or stdout from a linux machine to ubuntu linux machine using at best wget or other common package at worse ( hopefully not ssh access ) ? So far i can find a way to "...
eugeneK's user avatar
  • 400
5 votes
1 answer
2k views

nginx logs php-fpm's stderr output cut off at seemingly random positions

Ever since I started using a PHP library that produces a long call chain it's been increasingly difficult to debug issues caused by it because my error logs end up containing output like this: (some ...
SeinopSys's user avatar
  • 532
0 votes
2 answers
4k views

Capture outputs with bash to log it and alert user

I am modifying a backup script to save multiple servers with multiple services and different configurations using bash on an Ubuntu server. I save outputs from commands into a log file and sent these ...
Loenix's user avatar
  • 101
0 votes
2 answers
2k views

how to save stderr and stdout to a file in ubuntu

when i run echo "invalid crt" | openssl x509 -noout -modulus | openssl md5 &>> error.log this show below error unable to load certificate 139903857870496:error:0906D06C:PEM routines:...
Surjit Sidhu's user avatar
3 votes
1 answer
4k views

tail /dev/stderr from errors within supervisord php cli script

To make this simple, I want to know if it's possible to access the STDERR like a channel. I don't want the data to log to a file and then tail the file because the amount of information that I want to ...
Jeff -More Active-'s user avatar
-1 votes
1 answer
910 views

autostart rc.local 2>&1 redirect, 'open /dev/tty: No such device or address'

I'm trying to execute this command with rc.local: wget http://address/file -P /root/ 2>&1 | stdbuf -o0 awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | whiptail --gauge "Progress" 6 ...
koralgolek's user avatar
0 votes
1 answer
810 views

Where does cron store the real-time stderr logs?

I've got a cron job configured to run a command like some-command 2>&1 >/dev/null | tee -a /tmp/some-command.STDERR.$(date +\%Y-\%m-\%d.\%H.\%M) I've also got a tmpreaper cron job that ...
Chris Conway's user avatar
3 votes
2 answers
3k views

logging/capturing STDERR/STDOUT on Amazon EC2

I'm looking for a solution that would allow me to automatically capture the STDOUT/STDERR of a process running on Amazon EC2, and send it (remotely) to another server. Sound simple, except: I will ...
user205122's user avatar
3 votes
1 answer
3k views

SNMP error reporting to stdout

Why does net-snmp after "No Such Object available on this agent at this OID" errors exit with 0 and print the error message to STDOUT while other errors are printed to STDERR and have an exit status 1?...
user3040975's user avatar
266 votes
6 answers
644k views

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 ...
QuinnBaetz's user avatar
  • 2,769
4 votes
1 answer
1k views

On Apache2/mod_perl2, stderr output doesn't go to logfile nominated by ErrorLog

I like to maintain separate Apache2 logfiles for each of my named virtual hosts, like this: <VirtualHost *:80> ServerName myhost.example.com ErrorLog /var/log/apache2/myhost-error.log </...
Mike Taylor's user avatar
4 votes
2 answers
3k views

Null bytes in a file created by 2> rotated with logrotate?

I'm using the script utility to record terminal sessions, and using logrotate (with copytruncate, script ignores HUP and keeps writing to the rotated file otherwise) to periodically upload chunks of ...
Jeremy Wadhams's user avatar
0 votes
1 answer
2k views

Can't redirect STDERR or STDOUT to file

I have application written in Go language and it runs in screen (I do not think problem relates to Go language. I believe it uses STDOUT and STDERR) screen -S log_server -d -m go run log_server.go 2 &...
Max's user avatar
  • 133
8 votes
4 answers
1k views

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 ...
Rio's user avatar
  • 345
0 votes
1 answer
1k views

IIS7 and PHP: Show error messages with all the rest of the output

Okay, this is slowly getting annoying. I'm used to work with Apache Webservers and never had any of these problems. IIS seems to try to be intelligent - or whatever. Here's my situation: My customer ...
BlaM's user avatar
  • 3,966
3 votes
1 answer
789 views

Write stderror to a file using PowerShell

How do I capture error messages from a PowerShell-launched command in a text file? I searched the Internet for a while and found that supposedly, I should be able to do something like ""C:\UniServer\...
Zian Choy's user avatar
  • 271
11 votes
4 answers
12k views

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 ...
mrmrcoleman's user avatar
1 vote
1 answer
1k views

How to remove the hint in the terminal?

As a normal user , when I run some command like ps\netstat, the terminal hint me: (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see ...
jiangchengwu's user avatar
0 votes
2 answers
5k views

How to make SCP on Linux output "success" to stdout instead of stderr?

We have a cron job that sends stuff to another company using SCP. The command look like this: 10 0 * * * ssh USER@LOCAL-SERVER 'scp -q ~/some/dir/* REMOTE_SERVER:/other/dir/' >> ~/log/some.log ...
monster's user avatar
  • 618
2 votes
2 answers
6k views

Windows cmd stderr redirection to stdout while keeping output to stderr?

Is there a way in Windows 7 cmd shell to redirect the stderr to stdout while keeping the stderr stream intact? For example, I have a program that outputs to stderr and stdout the following message ...
Stecy's user avatar
  • 122
2 votes
2 answers
268 views

Redirect STDERR separately for the shell and the program

I'm doing some audit automation, this example describes checking the version of Java, even though other programs do the same thing. The output of "java -version" goes to STDERR, which is easily ...
GraduateOfAcmeU's user avatar
3 votes
1 answer
2k views

Forcing command on ssh's authorized_keys merges STDOUT and STDERR

I've been working to have a script in a centralized server to do some things and output a .tar.gz file (see redirect temporarily STDOUT to another file descriptor, but still to screen). I also have ...
Carlos Campderrós's user avatar
1 vote
1 answer
777 views

stdout, stderr, and what else? (going insane parsing slapadd output)

I am using slapadd to restore a backup. That backup contains 45k entries which takes a while to restore so I need to get some progress update from slapadd. Luckily for me there is the -v switch which ...
Max's user avatar
  • 3,623
11 votes
3 answers
39k views

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:\<logfiledestination> is printed. My ...
CoV 's user avatar
  • 111
1 vote
1 answer
454 views

Does STDERR go to syslog in an LSB init script?

I am running a Debian system and have an init script in /etc/init.d/ that starts a daemon using start-stop-daemon: start-stop-daemon --start --quiet --pidfile /tmp/myproject.pid --exec /usr/bin/...
user35042's user avatar
  • 2,731
1 vote
3 answers
4k views

Redirect cronjob STDOUT and STDERR to /dev/null not working

I'm baffled as to why this isn't working. I've tried redirecting STDOUT and STDERR using "&>" and also "2>&1" and neither seems to work. I still get e-mailed by this cron job (every minute!) ...
user avatar
2 votes
1 answer
783 views

CentOS 5.3, Perl, bash commands, Hide ALL output to screen

I am running the following command: [user@server ~]$ /usr/sbin/ntpdate -d IPREMOVEDFORSECURITY | egrep 'transmit timestamp' | tail -1 | awk '{print $4, $5, $6, $7, $8}' host found : ...
Garrett's user avatar
  • 23
1 vote
1 answer
3k views

Howto get exit code of a script started in screen session

I am currently creating a backup script which uses screen to start a backup job with rsync inside a screen session. The backup jobs are started as follows. screen -dmS backup /usr/bin/rsync ... As ...
Bettina's user avatar
  • 11
7 votes
2 answers
8k views

Start Sinatra app in the background with stdout and stderr redirected (append) to a file

I have a Sinatra app which I run on my local machine using ruby app.rb. While deploying it on a remote machine via ssh, how do I run it in background and redirect stdout and stderr to a log file? On ...
letronje's user avatar
  • 429
21 votes
2 answers
22k views

tar: kill the error message: 'tar: Removing leading `/' from member names'

I run this from a cronjob: tar -czvf /var/backups/svn.tgz /var/svn/* That generates this on stderr: tar: Removing leading `/' from member names I would like to avoid this because it is not a real ...
Dan's user avatar
  • 369
0 votes
1 answer
653 views

Suppress EXT3-fs warning on mount

I am familiar with output suppress on Unix machines, ie: cat /file/that/doesnt/exist > /dev/null 2>& However I can't seem to suppress the output of mount when an ext3 filesystem is mounted ...
tjbp's user avatar
  • 193
17 votes
4 answers
36k views

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 ...
jondahl's user avatar
  • 173
29 votes
4 answers
27k views

How to pipe stderr without piping stdout

How do I pipe the standard error stream without piping the standard out stream? I know this command works, but it also writes the standard out. Command 2>&1 | tee -a $LOG How do I get just ...
C. Ross's user avatar
  • 3,115
172 votes
11 answers
72k views

bash: print stderr in red color

Is there a way to make bash display stderr messages in red color?
kolypto's user avatar
  • 11.4k
0 votes
3 answers
382 views

Unix: Delayed stderr display

Is there a way to display errors summary (from stderr) after an application has finished? E.g. rsync with "--progress" displays LOTS of data, including errors. But when it finishes - it just says "...
kolypto's user avatar
  • 11.4k