In some test cases, I used tools like "dd" and "shed" to manually read a block from the disk, modify it using a hex editor and write it back using "dd".
I need help with some linux commands I can use to read the block and change the data to induce the corruption....as I want to automate my test case.
Thanks In Advance,
Prince Sharma
---------- Post updated at 05:39 AM ---------- Previous update was at 05:09 AM ----------
Test Scenario is like :
h)Using dd, copy out the contents of an EA block into a file.
i)Using shed editor, edit the contents at the offset 0004 to 00 instead of 01. This corrupts the EA header ref count.
j)Using dd, write back the contents of the modified block .
Plesae help me.
---------- Post updated at 06:29 AM ---------- Previous update was at 05:39 AM ----------
I do this to get a file with dumb block data.
Please help me with some shell command which I can use to read the dumb block data and modify it.
Last edited by jim mcnamara; 04-02-2013 at 09:24 AM..
You can read a byte 00 from /dev/zero. Set the blocksize to 1 and dd can overwrite the specified 'block' in that file without shrinking or overwriting it otherwise(seek to skip forward in output, conv=notrunc to not shrink the file to 5 bytes)
Dear All,
I am relatively new to UNIX and wanted to accomplish a simple task which should be automated. That's why I need your help. I shall briefly describe what I want.
Basically, there is a process (X) (related to a particular software which I am using in my system) which automatically... (5 Replies)
Hello!
Need help to write a Linux script that can be run from windows using command/Cygwin/any other way. I am new to scripting, actually i am trying to automate server health check like free disk space, memory along with few services status, if any services is not running then start services ,... (7 Replies)
Hi,
I am trying to count the number of times a string of letters occurs in a file for multiple unique strings of letters. Right now I can do this one at a time using the following code (in this example I am searching for the string "AAA"):
echo AAA >> outfile.txt
grep -c "AAA" -r... (4 Replies)
Hi all,
I'm new in this forum.
I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli".
The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory.
I know that the first are called HACMP for AIX... (0 Replies)
Dear all,
I I want to login to my Linux machine using putty and then run some script from Windows machine.we can do it after loging it and then execute the script by typing it in putty command line screen. but I want to automate it.So whenever I will fire this script,it will do the following... (4 Replies)
Hello!!
Is posible to automate ispell?? I have a lot of misspelled text and I want to launch a script that runs ispell choosing for example the first option, all that automatically. Is possible??
Thanks :) (4 Replies)
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
This is my first post so hello to all of you!
I have a script in bash-3.00 that needs to execute the following:
pkgrm (to remove an existing package)
pkgadd -d ( to install a new package)
The problem is that both commands prompt me to answer either y,n or q in order to proceed with... (13 Replies)
Hello all,
i've written a small piece of code that will read commands from standard input and executes the commands.
Its working fine and is execting the commands well. Accepting arguments too. e.g
#mkdir <name of the directory>
The problem is that its not letting me change the directory i.e... (4 Replies)
Hi
I wounder if some one knows how to make a script to automate user adding?
When i am starting the script it will add user like 04pers00 and fowllowing untill that i'm quit.
The password will be a standard password typed in the file.
I'm unsing Sun solaris 9 on Intel
Sorry for my... (1 Reply)