Questions tagged [stderr]

45 questions
3
votes
2 answers

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 what's happened so far to another server. This…
Jeremy Wadhams
  • 877
  • 2
  • 9
  • 19
3
votes
1 answer

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\usr\local\mysql\bin\mysqldump.exe" -h 192.0.2.0…
Zian Choy
  • 281
  • 5
  • 18
3
votes
1 answer

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 exchanged ssh keys, so now from a client machine I…
Carlos Campderrós
  • 773
  • 2
  • 6
  • 17
2
votes
2 answers

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 TO STDOUT TO STDERR I want to have two files…
Stecy
  • 122
  • 1
  • 2
  • 6
2
votes
2 answers

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 redirected, but I want to send shell errors (for…
2
votes
1 answer

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 : HOSTREMOVEDFORSECURITY Tue, Feb 15 2011 12:38:38.321 So the issue…
Garrett
  • 23
  • 2
1
vote
1 answer

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 timestamps on those?
1
vote
1 answer

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 it all.) I know could redirect STDERR to /dev/null…
1
vote
1 answer

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 gives an output similar to this one: added:…
Max
  • 3,523
  • 16
  • 53
  • 71
1
vote
1 answer

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/somebin || return 2 If /usr/bin/somebin writes to…
user35042
  • 2,681
  • 12
  • 34
  • 60
1
vote
3 answers

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!) with smbclient complaining that there are no files in the…
Aaron C. de Bruyn
  • 588
  • 10
  • 30
1
vote
1 answer

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 soon as the rsync job is finished, the screen…
Bettina
  • 11
  • 1
  • 2
1
vote
1 answer

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 verbose output of the shred command from a new ssh…
0
votes
2 answers

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 by mail. If the backup got an error from any…
Loenix
  • 101
  • 1
  • 2
0
votes
2 answers

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:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED…
Surjit Sidhu
  • 173
  • 1
  • 1
  • 6