Sponsored Content
Full Discussion: dd seek problem
Top Forums UNIX for Advanced & Expert Users dd seek problem Post 302230820 by silvermoon on Sunday 31st of August 2008 03:35:36 PM
Old 08-31-2008
Quote:
Originally Posted by era
Can you examine the resulting file? I assume you get the result from the first experiment in the first 281,881 bytes after the second operation, and its contents are 2 x 281,881 bytes (but of course, in the absence of a file system, it's hard to tell). What about when you copy it back, do you get padding on either end of the file, or the wrong number of bytes, or the wrong contents?
When it's copied back, I get the same size file. When I view the contents of the file, it has got the last few hundred bytes of the jpg. The rest of the file is zero's that were placed on the memory stick before the copy operation occurred.

I finally realized that default 550 obs was the issue when combined with skip, whereas seek used 281881.


The program I'm writing is in Python. My goal is to write a file at any location I want on any drive. It's part of an encryption idea, where the encryption decides where to store the file rather than the file management system. That's when I need to seek a number of bytes that isn't the ibs. I'm not sure the dd is going to help me with this. But I can't say that with full confidence, because I don't fully understand how it works yet.
 

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 a channel identifier such as returned from a previous invocation of open or socket. 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. SEE ALSO
file(n), open(n), close(n), gets(n), tell(n) KEYWORDS
access position, file, seek Tcl 8.1 seek(n)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy