David Haller wrote: > Hello, > > On Thu, 18 Jun 2020, Dale wrote: >> David Haller wrote: > [..] >>> Compile with: >>> gcc $CFLAGS -o ones ones.c >>> or >>> gcc $(portageq envvar CFLAGS) -o ones ones.c >>> >>> and use/test e.g. like >>> >>> ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock > [..] >> I got it to compile, at least it created a file named ones anyway. What >> I'm unclear about, where is the if= for dd in the command? All the >> commands I've seen before has a if= and a of=. The if for input and of >> for output or target. > ==== man 1 dd ==== > if=FILE > read from FILE instead of stdin > [..] > of=FILE > write to FILE instead of stdout > ==== > > note the stuff after 'instead' ;)
So it is piped in with the | thingy? Got it. >> I'm assuming that if I want to target sdb, I'd >> replace null with /dev/sdb. > Yes. > >> As I've posted before, even my scripting skills are minimal. Surprised >> I got it to compile even. > Well, you could copy & paste and on gentoo, there is bound to be a > 'gcc' ;) Yea, just my skills on that sort of thing is minimal or none. I do copy and paste pretty well tho. ;-) >> something. I placed all this in the /root directory. I'm assuming I >> can copy paste the commands above while in /root to make it work? > Yes. Or put 'ones' in /root/bin/ or even /usr/local/bin. Depending on > if you expect to use the program later on. But if it's just for this > once it's fine in /root/ alongside the sourcecode. > > HTH, > -dnh > Well, I made notes in my frequent commands file. It may be rare that I use it but when I do, maybe the notes will help. Maybe. ;-) Thanks much. Dale :-) :-)