1 |
David Haller wrote: |
2 |
> Hello, |
3 |
> |
4 |
> On Thu, 18 Jun 2020, Dale wrote: |
5 |
>> David Haller wrote: |
6 |
> [..] |
7 |
>>> Compile with: |
8 |
>>> gcc $CFLAGS -o ones ones.c |
9 |
>>> or |
10 |
>>> gcc $(portageq envvar CFLAGS) -o ones ones.c |
11 |
>>> |
12 |
>>> and use/test e.g. like |
13 |
>>> |
14 |
>>> ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock |
15 |
> [..] |
16 |
>> I got it to compile, at least it created a file named ones anyway. What |
17 |
>> I'm unclear about, where is the if= for dd in the command? All the |
18 |
>> commands I've seen before has a if= and a of=. The if for input and of |
19 |
>> for output or target. |
20 |
> ==== man 1 dd ==== |
21 |
> if=FILE |
22 |
> read from FILE instead of stdin |
23 |
> [..] |
24 |
> of=FILE |
25 |
> write to FILE instead of stdout |
26 |
> ==== |
27 |
> |
28 |
> note the stuff after 'instead' ;) |
29 |
|
30 |
So it is piped in with the | thingy? Got it. |
31 |
|
32 |
|
33 |
>> I'm assuming that if I want to target sdb, I'd |
34 |
>> replace null with /dev/sdb. |
35 |
> Yes. |
36 |
> |
37 |
>> As I've posted before, even my scripting skills are minimal. Surprised |
38 |
>> I got it to compile even. |
39 |
> Well, you could copy & paste and on gentoo, there is bound to be a |
40 |
> 'gcc' ;) |
41 |
|
42 |
Yea, just my skills on that sort of thing is minimal or none. I do copy |
43 |
and paste pretty well tho. ;-) |
44 |
|
45 |
|
46 |
>> something. I placed all this in the /root directory. I'm assuming I |
47 |
>> can copy paste the commands above while in /root to make it work? |
48 |
> Yes. Or put 'ones' in /root/bin/ or even /usr/local/bin. Depending on |
49 |
> if you expect to use the program later on. But if it's just for this |
50 |
> once it's fine in /root/ alongside the sourcecode. |
51 |
> |
52 |
> HTH, |
53 |
> -dnh |
54 |
> |
55 |
|
56 |
|
57 |
Well, I made notes in my frequent commands file. It may be rare that I |
58 |
use it but when I do, maybe the notes will help. Maybe. ;-) |
59 |
|
60 |
Thanks much. |
61 |
|
62 |
Dale |
63 |
|
64 |
:-) :-) |