Sponsored Content
Full Discussion: dd seek problem
Top Forums UNIX for Advanced & Expert Users dd seek problem Post 302230785 by era on Sunday 31st of August 2008 11:21:22 AM
Old 08-31-2008
I think your interpretation of "seek" is wrong. It means to skip to the requested position.

Code:
vnix$ time dd if=/dev/zero bs=9876542 seek=42 count=1 of=/dev/null
1+0 records in
1+0 records out
9876542 bytes (9,9 MB) copied, 0,000559297 seconds, 17,7 GB/s

real    0m0.206s
user    0m0.004s
sys     0m0.004s

As you can tell by the byte count, it really only reads after seeking.

You are correct that the seek parameter expresses how many blocks to seek forward, but on a block device, this truly is a seek operation (move the disk head to the requested position), not a serial operation.

Of course, if you mean to read a lot of data after the seek operation, then the block size does affect the read, but I don't think it modifies the hardware buffer block size, i.e. slow down buffered reads.

Last edited by era; 08-31-2008 at 12:23 PM.. Reason: On reading after seeking
 

3 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Seek UNIX script tutor and help

I am new to UNIX shell script programming. I have coded one korn shell script used on solaris 10 for Oracle database rman cold backup. The first part of script is working. But only following part is not working. Please help me to point out the problem and errors in my code. Thanks a lot. # the... (2 Replies)
Discussion started by: duke0001
2 Replies

2. AIX

server seek internet

hello i'm working with aix 5.3 hacmp 5.4 P550 and P520 those two serevr every 10 seconds seek connection to the internet web. i check with sniffer software and i've got this details. the problem is that when i've problem with the internet those server get frizzzzzzz. on those servers running... (0 Replies)
Discussion started by: ariec
0 Replies

3. UNIX for Dummies Questions & Answers

Seek help configuring Sendmail 8.14.4 Unix

Seek help configuring Sendmail 8.14.4 Unix server. Not sure if this is the correct place to post or the Unix/Linux Forums job board. Seeking help configuring sendmail 8.14.4 on my Unix server. It appears I have an open relay. I was advised I need to modify a etc/mail/dir , a command line entry... (0 Replies)
Discussion started by: raecampus
0 Replies
seek(n) 						       Tcl Built-In Commands							   seek(n)

__________________________________________________________________________________________________________________________________________________

NAME
seek - Change the access position for an open channel SYNOPSIS
seek channelId offset ?origin? _________________________________________________________________ DESCRIPTION
Changes the current access position for channelId. ChannelId must be an identifier for an open channel such as a Tcl standard channel (stdin, stdout, or stderr), the return value from an invocation of open or socket, or the result of a channel creation command provided by a Tcl extension. The offset and origin arguments specify the position at which the next read or write will occur for channelId. Offset must be an integer (which may be negative) and origin must be one of the following: start The new access position will be offset bytes from the start of the underlying file or device. current The new access position will be offset bytes from the current access position; a negative offset moves the access position back- wards in the underlying file or device. end The new access position will be offset bytes from the end of the file or device. A negative offset places the access position before the end of file, and a positive offset places the access position after the end of file. The origin argument defaults to start. The command flushes all buffered output for the channel before the command returns, even if the channel is in nonblocking mode. It also discards any buffered and unread input. This command returns an empty string. An error occurs if this command is applied to channels whose underlying file or device does not support seeking. Note that offset values are byte offsets, not character offsets. Both seek and tell operate in terms of bytes, not characters, unlike read. EXAMPLES
Read a file twice: set f [open file.txt] set data1 [read $f] seek $f 0 set data2 [read $f] close $f # $data1 == $data2 if the file wasn't updated Read the last 10 bytes from a file: set f [open file.data] # This is guaranteed to work with binary data but # may fail with other encodings... fconfigure $f -translation binary seek $f -10 end set data [read $f 10] close $f SEE ALSO
file(n), open(n), close(n), gets(n), tell(n), Tcl_StandardChannels(3) KEYWORDS
access position, file, seek Tcl 8.1 seek(n)
All times are GMT -4. The time now is 09:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy