1 |
Hello, |
2 |
|
3 |
On Thu, 18 Jun 2020, Dale wrote: |
4 |
>David Haller wrote: |
5 |
[..] |
6 |
>> Compile with: |
7 |
>> gcc $CFLAGS -o ones ones.c |
8 |
>> or |
9 |
>> gcc $(portageq envvar CFLAGS) -o ones ones.c |
10 |
>> |
11 |
>> and use/test e.g. like |
12 |
>> |
13 |
>> ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock |
14 |
[..] |
15 |
>I got it to compile, at least it created a file named ones anyway. What |
16 |
>I'm unclear about, where is the if= for dd in the command? All the |
17 |
>commands I've seen before has a if= and a of=. The if for input and of |
18 |
>for output or target. |
19 |
|
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 |
>I'm assuming that if I want to target sdb, I'd |
31 |
>replace null with /dev/sdb. |
32 |
|
33 |
Yes. |
34 |
|
35 |
>As I've posted before, even my scripting skills are minimal. Surprised |
36 |
>I got it to compile even. |
37 |
|
38 |
Well, you could copy & paste and on gentoo, there is bound to be a |
39 |
'gcc' ;) |
40 |
|
41 |
>something. I placed all this in the /root directory. I'm assuming I |
42 |
>can copy paste the commands above while in /root to make it work? |
43 |
|
44 |
Yes. Or put 'ones' in /root/bin/ or even /usr/local/bin. Depending on |
45 |
if you expect to use the program later on. But if it's just for this |
46 |
once it's fine in /root/ alongside the sourcecode. |
47 |
|
48 |
HTH, |
49 |
-dnh |
50 |
|
51 |
-- |
52 |
BUGS |
53 |
It is not yet possible to change operating system by writ |
54 |
ing to /proc/sys/kernel/ostype. -- Linux sysctl(2) manpage |