10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I am trying to get the position of a repeated string in a line using
grep -b -o "pattern"
In my server I am using GNU grep version 2.14 and the code is working fine. However when I am deploying the same code in a different server which is using GNU grep version 2.5.1 the code is not... (3 Replies)
Discussion started by: Subhamoy
3 Replies
2. Shell Programming and Scripting
Hi ,
I have a .gz file whose contents look like below.
data1^filename1
data2^filename2.
..
.
.
Is it possible to find out the byte offset of each record from the .gz file.
Like in an uncompressed file.
grep -nb "Filename" give the byte offset of the record in this case.
... (4 Replies)
Discussion started by: chetan.c
4 Replies
3. UNIX for Dummies Questions & Answers
I have read the below from the book bash cookbook.Tail +1 filenames is similar to cat filename
I have tried the same in Ubuntu 11.10 with bash. 4.0 .
I have received error for the Same.
May I know in which system that will work fine ?
Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies
4. Solaris
How to add offset to NTP client so that, for eg., clock is -20 seconds? (2 Replies)
Discussion started by: orange47
2 Replies
5. Shell Programming and Scripting
Hi,
I'm looking for a way (other than C) to pull out a number of bytes in a Linux file for a giving length. for example:
file1 contains 2 records:
abcdefghijkl
mnopqrstuv
.....
so, I want to pull starting in byte 9 for a length of 8
file2 would contain:
ijkmnopq
Thanks (2 Replies)
Discussion started by: jbt828
2 Replies
6. Shell Programming and Scripting
I have a lot of very large hex files that I need to change one value at the same offset and save to another file. I have a script that finds each file and just need to put an operator for each file.
I think sed might be able to do this but I have not used it before and would like some help. If... (8 Replies)
Discussion started by: Eruditass
8 Replies
7. Programming
Function: int fcntl(int fd, int cmd, struct flock * lock)
Data Type: struct flock
This structure is used with the fcntl function to describe a file lock. It has these members:
off_t l_start
This specifies the offset of the start of the region to which the lock applies, and... (1 Reply)
Discussion started by: DNAx86
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I want to read a file from a specified offset from the start of file. With the read command, is it possible to do so. Please suggest. Is there any other alternative?
Thanks,
Saurabh (2 Replies)
Discussion started by: saurabhsinha23
2 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I need to extract only XML details from large log file which may contain other unwanted junk details.
For example, our xml will be start as <OUTBOUND_MESSAGE .....> and ends with </OUTBOUND_MESSAGE>. I want to extract only lines between these start and end tag (Including these tags)... (5 Replies)
Discussion started by: thinakarmani
5 Replies
10. UNIX for Dummies Questions & Answers
Hello all,
I am trying to add chunks to my informix dataspace. I have one dataspace ( the rootdbs ) and the new chunk is a raw device. Precisely slice1 on my new external harddisk.
The question is, what should be the offset value. The document says, the offset is used by the engine to... (1 Reply)
Discussion started by: shibz
1 Replies
X86DIS(1) libdisasm X86DIS(1)
NAME
x86dis - disassemble a bytestream of Intel x86 instructions
SYNTAX
x86dis [-a offset|--addr=offset]
[-r offset len|--range=offset len]
[-e offset|--entry=offset]
[-s name|--syntax=name]
[-d name|--desc=name]
[-f file|--file=file]
[-o file|--out=file]
[-l file|--log=file]
[-p num|--pagesize=num]
[-h|-?|--help]
[-v|--version]
DESCRIPTION
A command-line interface to the libdisasm disassembler library.
OPTIONS
At least one option from the list -a, -e, -r must be given.
-f, --file=file
Read input bytes from file instead of stdin
-o, --out=file
Write output to file instead of stdout
-l, --log=file
Log errors to file instead of stderr
-p, --pagesize=num
Set page size for buffering STDIN to num (default 512K)
-s, --syntax=name
Set output syntax to name, where name is one of intel
(Intel syntax), att (AT&T syntax), raw (libdisasm syntax)
-d, --desc=name
Print a description of syntax name
-a, --addr=offset
Disassemble single instruction at offset
-e, --entry=offset
Disassemble forward from offset
-r, --range=offset len
Disassemble len bytes starting at offset
All offset and len parameters are expected to follow the conventions used in strtoul(3), where hexadecimal numbers have the prefix 0x,
octal numbers have the prefix 0, and decimal numbers have no prefix. A value of 0 for len indicates that that range extends to the end of
the file.
EXAMPLES
cat `which ls` | x86dis -s intel -e 0x00 -r 0x00 -1 -a 0xEEEE
x86dis -e 0 -s intel < bootsect.img
x86dis -d -s raw -f a.out -e `readelf -h a.out |
grep Entry | awk '{ printf( "0x%%x", strtonum($4) - 0x8048000 ) }` echo '55 89 e5 83 EC 08' | perl -ane 'foreach(@F){print
pack("C",hex);}'| x86dis -e 0 -s att
NOTES
x86dis performs no file format parsing, nor any verification that its input is in fact executable binary code. All offsets are assumed to
be from the start of the file, with no load addresses applied. The intent is to provide a bytestream disassembler rather than an object
file disassembler.
Descriptions of the various output formats can be obtained using the -d option.
AUTHORS
mammon_ <mammon_@users.sourceforge.net>
SEE ALSO
bastard(1), libdisasm(7), x86_disasm(3), x86_format_insn(3), x86_init(3)
mammon_ 0.21 X86DIS(1)