05-21-2009
cp output /dev/null results in not a directory
Hello,
I am working on a script to measure the read performance of a busybox environment. The logical choice is to use a command line like:
(time cp * /dev/null) 2> /tmp/howlong.txt
Ah, the rub is cp or /dev/null will only accept a single file at a time.
The result in the txt file is and output list that basically shows /dev/null/filename Not a directory.
I tried the same with using dd if=* of=/dev/null bs=1M, alas the results were similar.
I tried using a for loop, but I could not get time to work with syntax errors.
Example:
Works:
for FILE * cp $FILE /dev/null ; done
Fails:
(time for FILE * cp $FILE /dev/null ; done) 2> /tmp/howlong.txt
Any help here would be appreciated.
Thanks,
-Steve
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
partclone.dd
partclone.dd(8) System Manager's Manual partclone.dd(8)
NAME
partclone.dd - The utility to clone/restore raw file like dd.
SYNOPSIS
partclone.dd [options]... [MODE] [SOURCE FILE] [OUTPUT FILE]
DESCRIPTION
partclone.dd is a part of Partclone project. Partclone is a project like the well-known backup utility "Partition Image" a.k.a partimage.
Partclone provide utilities to back up used blocks and design for higher compatibility of the file system using supported library like
e2fslibs.
OPTIONS
-o, --output FILE
Output FILE
-O --overwrite FILE
Output FILE, overwriting if exists
-s, --source FILE
Source FILE
-L, --logfile FILE
Log FILE
-c, --clone
Save to the special image format
-r, --restore
Restore from the special image format
-b, --dev-to-dev
Local device to device copy mode
-R, --rescue
Continue after disk read errors
-dX, --debug=X
Set the debug level to X = [0|1|2]
-C, --no_check
Don't check device size and free space
-X, --dialog
Output message as Dialog Format
-I, --ignore_fschk
Ignore filesystem check
--ignore_crc
Ignore crc check error
-F, --force
Force progress
-f, --UI-fresh
Fresh times of progress
-q, --quiet
quiet mode, no progress update
-v, --version
Display partclone version
-h, --help
Display this help
Examples:
clone /dev/hda1 to hda1.dd.img and display debug information.
partclone.dd -c -d -s /dev/hda1 -o hda1.dd.img
restore /dev/hda1 from hda1.dd.img and display debug information.
partclone.dd -r -d -s hda1.dd.img -o /dev/hda1
REPORTING BUGS
Report bugs to <thomas@nchc.org.tw>
SUPPORT
You can get support at http://partclone.org
AUTHOR
This manual page was written by Thomas Tsai <thomas@nchc.org.tw>
partclone 0.2.48 Nov 2007 partclone.dd(8)