Hi Everyone, firstly like to say Hi can't say how many times I've randomly searched for something via google and got the answer on this forum... its a lot
I know there is a major thread on how dd works but I'm really confused by it in terms of what I'm trying to do
Basically I've inherited this concept where say in a dir
/var/spool/send
a person runs this command dd if=/dev/zero of=.sequence bs=8 count=1
Now what I inherited is a binary c file that can lock this .sequence, print out the number 'stored', and bump up the number. Unfortunately I don't have access to the original c code source currently and considering I'm just trying to duplicate into java.
e.g
first time program runs it just prints out
00000000000000000000
second prints out
00000000000000000001
The idea is to create a sequencing filename mechanism. So if I was spooling a bunch of files to a web service or some sort of socket the program writing to the files would first use 00000000000000000000 as the file name then 00000000000000000001 for second ...
Now I'm trying to figure out how this was done in the c program and actually do the same thing in java.
I noticed something in the forum message but I'm not sure how it correlates
zeus@pandion:~/tests$ hexdump .sequence
0000000 0002 0000 0000 0000
0000008
Thanks guys this is probably something so simple but...