Sponsored Content
Top Forums UNIX for Dummies Questions & Answers cp output /dev/null results in not a directory Post 302318893 by jim mcnamara on Friday 22nd of May 2009 03:20:31 PM
Old 05-22-2009
In standard shell:
Code:
#!/bin/ksh
time for FILE in *
do
   cp $FILE /dev/null
done 2>/dev/null

works just fine 2> /dev/null hides errors about directories
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Q1 :/dev/null Q2 -A

Hi, Q1-What does nroff -ms > /dev/null Q2- What does mean -A under STAT column : ps aux |head -20 UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND root 516 93,0 0,0 12 12 - A 04 nov 3906:51 wait Thank you. (4 Replies)
Discussion started by: big123456
4 Replies

2. Solaris

URGENT - setup port and dump all output to /dev/null or a file

Please help urgently. I need to setup up some sort of service on a solaris server on a port. I dont need it do anything special, anything that is sent to this port from an external server should be dump to /dev/null or a flat file.. Can you help urgently? (1 Reply)
Discussion started by: frustrated1
1 Replies

3. Shell Programming and Scripting

> /dev/null

hello all, In many shell scripts i found '> /dev/null' , i am not able to get this, will any one please explain why we are using this. thanks sudha (2 Replies)
Discussion started by: rrs
2 Replies

4. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

5. Ubuntu

tar not reading if output directed to /dev/null

I stumbled across a somewhat strange behavior of tar and find no explanation for it: i was testing a DVD for read errors and thought to simply tar the content and direct the output to /dev/null: tar -cvf - /my/mountpoint/*ts > /dev/null This way i expected the system to read the complete... (4 Replies)
Discussion started by: bakunin
4 Replies

6. Shell Programming and Scripting

Error output of cat to /dev/null

Hello, I'm trying to send the error output of a 'cat' operation to /dev/null like this: cat /dirA/dirB/temp*.log > /dirA/dirB/final.log 2>/dev/null This works perfectly in a terminal, but not when placed in a script. If there are no files matching temp*.log the script outputs an error... (7 Replies)
Discussion started by: Nils88
7 Replies

7. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&" echo "hello" > /dev/null 2>&1 echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies

8. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

I apologize if this question has been answered else where or is too elementary. I ran across a KSH script (long unimportant story) that does this: if ; then CAS_SRC_LOG="/var/log/cas_src.log 2>&1" else CAS_SRC_LOG="/dev/null 2>&1" fithen does this: /usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies

9. Shell Programming and Scripting

redirect the audio output to /dev/null

I'm using an text-to-speech synthesis in a script, and I need to redirect it's output to /dev/null how can I do that ? And how to redirect the stream to his normal output then (sound card ) ? thankx (2 Replies)
Discussion started by: firelink
2 Replies

10. Shell Programming and Scripting

Help with /dev/null Please

Hello All and a Happy New year to yous guys. I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work. bash-3.00$ ls -l C* | wc -l 2>/dev/null ls:... (2 Replies)
Discussion started by: bbbngowc
2 Replies
SOLARPOWERLOG(1)														  SOLARPOWERLOG(1)

NAME
solarpowerlog - queries data from a photovoltaic inverter SYNOPSIS
solarpowerlog [options] DESCRIPTION
The program trackd and logd data from photovoltaic inverters, collect power data and store them. OPTIONS
The program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -h, --help Show summary of options. -v, --version Show version of program. -b, --background Runs the program in the background, detaching it from the console. -c, --conf filename The configuration to be used. Default is solarpowerlog.conf, looked for in the current directory. --dumpcfg Dump configuration structure, then exit --chdir arg working directory for daemon (only used when running as a daemon). Defaults to / --stdout arg redirect stdout to this file (only used when running as a daemon). Defaults to /dev/null --stderr arg redirect stderr to this file (only used when running as a daemon). Defaults to /dev/null --pidfile arg create a pidfile after the daemon has been started. (only used when running as a daemon). Default: no pid file SEE ALSO
http://sourceforge.net/apps/mediawiki/solarpowerlog/index.php June 16, 2009 SOLARPOWERLOG(1)
All times are GMT -4. The time now is 04:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy