LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-16-2012, 04:22 AM   #1
lchlebikova
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
How to find the nineteenth byte and find its original value


How to find the nineteenth byte? I downloaded a file from the internet (xxx.r) and I need to find the nineteenth byte and then write its original value. It can be any file, just need to find the right command.
Thanx for help!
 
Old 12-16-2012, 04:33 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Hi and welcome to LinuxQuestions!

I wonder what is the purpose of this, anyway you can try the dd command (be careful if you're not experienced with it). For example:
Code:
dd if=xxx.r count=1 ibs=1 skip=18 2>/dev/null
will send the 19th byte to the standard output, so that you can store it in a variable. If you want to redirect it to a file, add the of predicate:
Code:
dd if=xxx.r of=file.out count=1 ibs=1 skip=18 2>/dev/null
Hope this helps.
 
Old 12-16-2012, 04:36 AM   #3
lchlebikova
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
thank you a lot for your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Find URL in Debian package index via awk/sed (=find a line, then search from there) maddes.b Linux - Software 11 06-28-2013 07:37 AM
For ARM devices, where can I find the additional 8-byte header with the machine type? chinabenjamin66 Linux - Embedded & Single-board computer 0 11-12-2012 08:43 AM
find out original MAC address niharikaananth Linux - Newbie 6 03-07-2012 08:06 AM
[SOLVED] Script: find, compress, remove original files, older than x days? blacklion Linux - General 5 02-27-2012 10:22 AM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration