Sponsored Content
Top Forums Programming how to inspect the bytes in a file? Post 302307106 by sneakyimp on Tuesday 14th of April 2009 03:09:29 PM
Old 04-14-2009
I graduated from college years ago. I have since been writing a lot of PHP and have rarely, if ever, dealt with raw binary files. I can totally appreciate your desire to not assist those little cheats. I am not one of them. I am, however, returning to C++ after many years absence.

I'm using hexdump which seems perfect:
Code:
My-Mac:red sneakyimp$ hexdump -vx rgb.raw
0000000    0000    0000    0000    0000    0000    0000    0000    0000
0000010    0000    0000    0000    0000    ffff    0000    0000    0000
0000020    0000    0000
0000024

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Take a file from the system and put on tape and reset the file to 0 bytes

:mad: I did this the other day but one of my support personnel removed my history so i could call it back up to remeber the exact command since i am air-headed at times. I am trying to take a 30 MEG file off the system and drop it to tape then i want to make the file go back to being 0 bytes so... (1 Reply)
Discussion started by: JackieRyan26
1 Replies

2. Shell Programming and Scripting

delete bytes from file

I'm doing a bit of hex editing with dd and I can replace values fairly simply. However, I've run across a situation where I need to delete bytes in the file and I'm not sure how to do that. For example: Input file has: 1234567890 Output needs to be: 123abc90 I tried this: printf... (6 Replies)
Discussion started by: Loriel
6 Replies

3. Shell Programming and Scripting

Remove first N bytes and last N bytes from a binary file on AIX.

Hi all, Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this? Your help is greatly appreciated!! Best Regards, Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies

4. UNIX for Dummies Questions & Answers

Bytes of character in file

Hi, How do I check for the total bytes of character used by a file? Can I used a od command to check? Thanks. (1 Reply)
Discussion started by: user50210
1 Replies

5. Shell Programming and Scripting

Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like Few lines in data are not being processed. After googling it I came to know that adding such line would give some memory to it ini_set("memory_limit","64M"); my input file size is 1 GB. Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies

6. Programming

Copying 1024 bytes data in 3-bytes chunk

Hi, If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script. dd bs=1024 count=3 if=/src of=/dest But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Discussion started by: royalibrahim
3 Replies

7. UNIX for Dummies Questions & Answers

X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ??

Hello guys. I really hope someone will help me with this one.. So, I have to write this script who: - creates a file home/student/vmdisk of 10 mb - formats that file to ext3 - mounts that partition to /mnt/partition - creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies

8. Shell Programming and Scripting

Shell script - entered input(1-40 bytes) needs to be converted exactly 40 bytes

hello, suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly. example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly. enter your name: donald duck (this is of 11 bytes) expected is as below - display 11... (3 Replies)
Discussion started by: shravan.300
3 Replies

9. Shell Programming and Scripting

Get file's first x bytes

is there a better way to do this: head -c 10000k /var/dump.log | head -c 6000k unfortunately, the "-c" option is not available on sun solaris. so i'm looking at "dd". but i dont know how to use it to achieve the same exact goal as the above head command. this needs to work on both solaris... (5 Replies)
Discussion started by: SkySmart
5 Replies

10. Shell Programming and Scripting

awk code to inspect variable before printing

i have a unique scenario id like help with. im currently running this command and it does what i want: printf '%s\n' "${RawContent}" | awk '/## Beginning Stages ##/,/## Ending Stages ##/' | awk '!/^#.*\!|^#\!|DefaultError/' Can this be shortened? I'm looking for something portable as... (8 Replies)
Discussion started by: SkySmart
8 Replies
gst-inspect-0.8(1)						   User Commands						gst-inspect-0.8(1)

NAME
gst-inspect-0.8, gst-inspect - print information about a GStreamer element or plugin SYNOPSIS
gst-inspect-0.8 [--print-all] [gst-std-options] [element | plugin] gst-inspect [--print-all] [gst-std-options] [element | plugin] [--gst-list-mm] [--gst-mm=string] [--print] DESCRIPTION
gst-inspect-0.8 prints information about available GStreamer plugins, information about a particular plugin, or information about a partic- ular element. If no element or plugin argument is specified, gst-inspect-0.8 prints a list of all plugins and elements. If an element or plugin argument is specified, gst-inspect-0.8 prints information about that element or plug-in. If a given argument is valid as either an element or a plugin, gst-inspect-0.8 treats the argument as an element, by default. gst-inspect is a wrapper script that runs the latest installed version of gst-inspect-X.X. For example, if both gst-inspect-0.7 and gst- inspect-0.8 are installed on your system, gst-inspect runs gst-inspect-0.8. OPTIONS
The following options are supported by gst-inspect-0.8 and gst-inspect: --print-all Print all elements. You can also use -a to specify this option. gst-std-options Standard options available for use with most GStreamer applications. See gst-std-options(5) for more information. The following options are supported by gst-inspect only: --gst-list-mm List found major/minor versions. This option displays the versions that are available. --gst-mm=string Force major/minor version. This option enables you to specify a specific version to run, if you do not want to run the default version. --print Print wrapped command line. This option displays the command that will be run, and then runs the command. OPERANDS
The following operands are supported: element Name of an element. plugin Name of a plugin. EXAMPLES
Example 1: Displaying Information About a Plugin: example% gst-inspect-0.8 alaw Plugin Details: Name: alaw Description: ALaw audio conversion routines Filename: /usr/lib/gstreamer-0.8/libgstalaw.so Version: 0.8.3 License: LGPL Package: GStreamer Plugins Origin URL: http://gstreamer.net/ alawenc: PCM to A Law conversion alawdec: A Law to PCM conversion 2 features: +-- 2 elements Example 2: Running the Wrapper Script and Displaying the Command Name example% gst-inspect --print /usr/bin/gst-inspect-0.8 FILES
The following files are used by this application: /usr/bin/gst-inspect-0.8Executable for GNOME help browser /usr/bin/gst-inspect Wrapper script that runs the latest installed version of gst-inspect-X.X ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-media | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gst-complete(1), gst-compprep(1), gst-feedback(1), gst-launch(1), gst-launch-ext(1), gst-md5sum(1), gst-register(1), gst-thumbnail(1), gst- typefind(1), gst-xmlinspect(1), gst-xmllaunch(1), gstreamer-properties(1), libgstreamer-0.8(3), libgstgetbits(3), gst-std-options(5) NOTES
Original man page written by the GStreamer team at http://gstreamer.net/. Updated by Brian Cameron, Sun Microsystems Inc., 2004. SunOS 5.10 14 Oct 2004 gst-inspect-0.8(1)
All times are GMT -4. The time now is 02:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy