Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #90165 > unrolled thread
| Started by | Eli the Bearded <*@eli.users.panix.com> |
|---|---|
| First post | 2026-08-19 21:20 +0000 |
| Last post | 2026-08-24 19:08 +0100 |
| Articles | 20 on this page of 77 — 16 participants |
Back to article view | Back to comp.os.linux.misc
/dev/tcp Eli the Bearded <*@eli.users.panix.com> - 2026-08-19 21:20 +0000
Re: /dev/tcp Richard Kettlewell <invalid@invalid.invalid> - 2026-08-19 23:53 +0100
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-19 23:42 +0000
Re: /dev/tcp Eli the Bearded <*@eli.users.panix.com> - 2026-08-20 00:59 +0000
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-20 03:59 +0000
Re: /dev/tcp Nuno Silva <nunojsilva@invalid.invalid> - 2026-08-20 10:10 +0100
Re: /dev/tcp Eli the Bearded <*@eli.users.panix.com> - 2026-08-20 18:15 +0000
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-20 23:30 +0000
Re: /dev/tcp Nuno Silva <nunojsilva@invalid.invalid> - 2026-08-21 01:18 +0100
Re: /dev/tcp Marc Haber <mh+usenetspam2616@zugschl.us> - 2026-08-21 09:52 +0200
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-21 08:12 +0000
Re: /dev/tcp Marc Haber <mh+usenetspam2616@zugschl.us> - 2026-08-21 11:16 +0200
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-21 22:57 +0000
Re: /dev/tcp Marc Haber <mh+usenetspam2616@zugschl.us> - 2026-08-22 06:17 +0200
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-21 21:50 -0400
Re: /dev/tcp Anssi Saari <anssi.saari@usenet.mail.kapsi.fi> - 2026-08-24 17:42 +0300
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-24 23:53 +0000
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-25 02:27 -0400
Re: /dev/tcp vallor <vallor@vallor.earth> - 2026-08-23 00:56 +0000
Re: /dev/tcp Rich <rich@example.invalid> - 2026-08-23 04:01 +0000
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-23 03:37 -0400
Re: /dev/tcp "Carlos E.R." <robin_listas@es.invalid> - 2026-08-23 13:50 +0200
Re: /dev/tcp vallor <vallor@vallor.earth> - 2026-08-23 22:28 +0000
Re: /dev/tcp "Carlos E.R." <robin_listas@es.invalid> - 2026-08-24 09:35 +0200
Overwriting with random data (was: Re: /dev/tcp) Nuno Silva <nunojsilva@invalid.invalid> - 2026-08-24 11:10 +0100
Re: Overwriting with random data "Carlos E.R." <robin_listas@es.invalid> - 2026-08-24 20:34 +0200
Re: Overwriting with random data Richard Kettlewell <invalid@invalid.invalid> - 2026-08-24 20:57 +0100
Re: Overwriting with random data "Carlos E.R." <robin_listas@es.invalid> - 2026-08-24 22:26 +0200
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-25 00:37 -0400
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-24 00:31 -0400
Re: /dev/tcp "Carlos E.R." <robin_listas@es.invalid> - 2026-08-24 09:45 +0200
Re: /dev/tcp The Natural Philosopher <tnp@invalid.invalid> - 2026-08-23 12:52 +0100
Re: /dev/tcp The Natural Philosopher <tnp@invalid.invalid> - 2026-08-23 12:50 +0100
Re: /dev/tcp Rich <rich@example.invalid> - 2026-08-20 13:50 +0000
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-20 13:02 -0400
Re: /dev/tcp Rich <rich@example.invalid> - 2026-08-20 18:26 +0000
Re: /dev/tcp The Natural Philosopher <tnp@invalid.invalid> - 2026-08-21 13:54 +0100
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-21 22:57 -0400
Re: /dev/tcp "Carlos E.R." <robin_listas@es.invalid> - 2026-08-22 21:47 +0200
The hammer is best (Was: /dev/tcp) gazelle@shell.xmission.com (Kenny McCormack) - 2026-08-22 23:50 +0000
Re: The hammer is best (Was: /dev/tcp) c186282 <c186282@nnada.net> - 2026-08-23 04:28 -0400
Re: The hammer is best Richard Kettlewell <invalid@invalid.invalid> - 2026-08-23 10:14 +0100
Re: The hammer is best "Carlos E.R." <robin_listas@es.invalid> - 2026-08-23 13:55 +0200
Re: The hammer is best The Natural Philosopher <tnp@invalid.invalid> - 2026-08-23 13:16 +0100
Re: The hammer is best Marc Haber <mh+usenetspam2616@zugschl.us> - 2026-08-23 21:20 +0200
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-24 02:18 -0400
Re: The hammer is best The Natural Philosopher <tnp@invalid.invalid> - 2026-08-24 11:26 +0100
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-25 02:06 -0400
Re: The hammer is best Joed Oakes <lost@noway.home.invalid> - 2026-08-23 19:42 -0400
Re: The hammer is best Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-23 23:56 +0000
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-24 02:25 -0400
Re: The hammer is best rbowman <bowman@montana.com> - 2026-08-24 01:14 +0000
Re: The hammer is best "Carlos E.R." <robin_listas@es.invalid> - 2026-08-24 09:50 +0200
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-25 00:56 -0400
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-24 00:53 -0400
Re: The hammer is best rbowman <bowman@montana.com> - 2026-08-24 06:42 +0000
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-24 23:34 -0400
Re: The hammer is best rbowman <bowman@montana.com> - 2026-08-25 04:08 +0000
Re: The hammer is best The Natural Philosopher <tnp@invalid.invalid> - 2026-08-24 11:28 +0100
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-25 02:07 -0400
Re: The hammer is best c186282 <c186282@nnada.net> - 2026-08-23 22:16 -0400
Re: /dev/tcp Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2026-08-21 13:41 +0100
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-21 22:58 +0000
Re: /dev/tcp c186282 <c186282@nnada.net> - 2026-08-21 22:28 -0400
ksh (was: /dev/tcp) Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2026-08-24 13:56 +0100
Bash vs. ksh - Does it matter? And the 'vi' mode thing... (Was: ksh (was: /dev/tcp)) gazelle@shell.xmission.com (Kenny McCormack) - 2026-08-24 14:57 +0000
Re: ksh (was: /dev/tcp) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-24 21:08 +0000
Re: ksh (was: /dev/tcp) gazelle@shell.xmission.com (Kenny McCormack) - 2026-08-24 21:28 +0000
Re: ksh (was: /dev/tcp) rbowman <bowman@montana.com> - 2026-08-25 01:11 +0000
Re: ksh c186282 <c186282@nnada.net> - 2026-08-25 02:25 -0400
Re: /dev/tcp Eli the Bearded <*@eli.users.panix.com> - 2026-08-20 18:22 +0000
Re: /dev/tcp The Natural Philosopher <tnp@invalid.invalid> - 2026-08-21 13:57 +0100
Re: /dev/tcp Lars Poulsen <lars@beagle-ears.com> - 2026-08-23 06:37 -0700
Re: /dev/tcp Richard Kettlewell <invalid@invalid.invalid> - 2026-08-23 14:49 +0100
Re: /dev/tcp The Natural Philosopher <tnp@invalid.invalid> - 2026-08-23 16:13 +0100
Re: /dev/tcp Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-23 22:31 +0000
Re: /dev/tcp Richard Kettlewell <invalid@invalid.invalid> - 2026-08-24 19:08 +0100
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
| From | c186282 <c186282@nnada.net> |
|---|---|
| Date | 2026-08-23 03:37 -0400 |
| Message-ID | <5b2dnb6l8sPvPhf3nZ2dnZfqnPGdnZ2d@giganews.com> |
| In reply to | #90370 |
On 8/23/26 00:01, Rich wrote: > vallor <vallor@vallor.earth> wrote: >> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro <ldo@nz.invalid> wrote: >> >>> On Thu, 20 Aug 2026 18:15:27 -0000 (UTC), Eli the Bearded wrote: >>> >>>> In comp.os.linux.misc, Lawrence DOliveiro <ldo@nz.invalid> wrote: >>>>> >>>>> On Thu, 20 Aug 2026 00:59:41 -0000 (UTC), Eli the Bearded wrote: >>>>>> >>>>>> This came up in the context of "how to test network on a system >>>>>> with no root and no helpful utilities installed." >>>>> >>>>> So a version of bash that supports /dev/tcp is somehow excluded >>>>> from that “no helpful utilities installed” assumption? >>>> >>>> The system being tested did not have bash installed. Busybox >>>> provided /bin/sh there. >>> >>> I thought you said you were testing the *network*, not the *system*. >>> >>> You can’t really do that (in general) without access to a proper >>> suite of diagnostic tools. >>> >>> In such a situation, I would try one (or both) of two things: >>> >>> * Reboot the machine with a SystemRescue USB stick >>> <https://www.system-rescue.org/>. That way, I get unconstrained >>> access to an entire system custom-designed precisely for running >>> diagnostics. >>> * Bring in my own machine, which already has my own custom setup on >>> it, and connect it to the network. >>> >>> Both of these also have the advantage of ruling out screwups in the >>> existing OS installation. >>> >>> And if you’re saying the situation would not allow me to do either of >>> these things, then I would not have accepted the job in the first >>> place. >> >> Have you ever agreed with someone? > > It's kind of the troll ethos, disagreeing brings on more chaos. There are always a few ... being negative/disagreeable or, worse, All-Superior is Their Main Thing. They feel they "Gain Power" that way. No, I'm not basing that on Freud or Jung - just long experience. I pref the "Let's All Get Along" approach. Everything goes MUCH smoother and solutions, rather than conflict, is the usual result. ANYway, /dev/tcp does have uses. It's worth exploring. Maybe YOU can find a use to suit YOUR needs/desires. I used it for a custom disk-scan/wipe app (had to use a 'C' module because huge track/cluster/byte numbers were needed for modern mag drives - the main app was in Lazarus for the pretty display and buttons). Note Lazarus/FPC *says* it supports huge seek numbers but DOESN'T ... limited to maybe 4gb.
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2026-08-23 13:50 +0200 |
| Message-ID | <6d3rlmxqg4.ln2@Telcontar.valinor> |
| In reply to | #90376 |
On 2026-08-23 09:37, c186282 wrote:
> On 8/23/26 00:01, Rich wrote:
>> vallor <vallor@vallor.earth> wrote:
>>> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro
>>> <ldo@nz.invalid> wrote:
>>>
>>>> On Thu, 20 Aug 2026 18:15:27 -0000 (UTC), Eli the Bearded wrote:
>>>>
>>>>> In comp.os.linux.misc, Lawrence DOliveiro <ldo@nz.invalid> wrote:
>>>>>>
>>>>>> On Thu, 20 Aug 2026 00:59:41 -0000 (UTC), Eli the Bearded wrote:
>>>>>>>
>>>>>>> This came up in the context of "how to test network on a system
>>>>>>> with no root and no helpful utilities installed."
>>>>>>
>>>>>> So a version of bash that supports /dev/tcp is somehow excluded
>>>>>> from that “no helpful utilities installed” assumption?
>>>>>
>>>>> The system being tested did not have bash installed. Busybox
>>>>> provided /bin/sh there.
>>>>
>>>> I thought you said you were testing the *network*, not the *system*.
>>>>
>>>> You can’t really do that (in general) without access to a proper
>>>> suite of diagnostic tools.
>>>>
>>>> In such a situation, I would try one (or both) of two things:
>>>>
>>>> * Reboot the machine with a SystemRescue USB stick
>>>> <https://www.system-rescue.org/>. That way, I get unconstrained
>>>> access to an entire system custom-designed precisely for running
>>>> diagnostics.
>>>> * Bring in my own machine, which already has my own custom setup on
>>>> it, and connect it to the network.
>>>>
>>>> Both of these also have the advantage of ruling out screwups in the
>>>> existing OS installation.
>>>>
>>>> And if you’re saying the situation would not allow me to do either of
>>>> these things, then I would not have accepted the job in the first
>>>> place.
>>>
>>> Have you ever agreed with someone?
>>
>> It's kind of the troll ethos, disagreeing brings on more chaos.
>
>
> There are always a few ... being negative/disagreeable
> or, worse, All-Superior is Their Main Thing. They feel
> they "Gain Power" that way.
>
> No, I'm not basing that on Freud or Jung - just long
> experience.
>
> I pref the "Let's All Get Along" approach. Everything
> goes MUCH smoother and solutions, rather than conflict,
> is the usual result.
>
> ANYway, /dev/tcp does have uses. It's worth exploring.
> Maybe YOU can find a use to suit YOUR needs/desires.
> I used it for a custom disk-scan/wipe app (had to
> use a 'C' module because huge track/cluster/byte numbers
> were needed for modern mag drives - the main app was
> in Lazarus for the pretty display and buttons).
>
> Note Lazarus/FPC *says* it supports huge seek numbers
> but DOESN'T ... limited to maybe 4gb.
I wrote a program that writes bytes on big partitions.
excerpted:
const
sourcefilename = './BigRandom';
rawdest: string = ''; // example: '/dev/sda11'
shuflecount = 1024;
arraysize = 1023;
ChunkSz=1048576;
type
tCacho= array [1..ChunkSz] of byte;
var
Fin, Fout: file of tCacho;
gotresult: Word;
BigData : array [1..shuflecount] of tCacho;
OutputIndex : Int64; // counts MiB written.
begin
// writes one MiB
{$I-}write(Fout,BigData[RandomIndex]);{$I+}
gotresult:= ioresult;
The purpose of the program is to fast fill a partition or disk with
nearly true random data. It is as fast as dd could be.
--
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
[toc] | [prev] | [next] | [standalone]
| From | vallor <vallor@vallor.earth> |
|---|---|
| Date | 2026-08-23 22:28 +0000 |
| Message-ID | <116fs5p$28rhg$2@dont-email.me> |
| In reply to | #90387 |
At Sun, 23 Aug 2026 13:50:30 +0200, "Carlos E.R." <robin_listas@es.invalid> wrote:
> On 2026-08-23 09:37, c186282 wrote:
> > On 8/23/26 00:01, Rich wrote:
> >> vallor <vallor@vallor.earth> wrote:
> >>> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro
> >>> <ldo@nz.invalid> wrote:
> >>>
> >>>> On Thu, 20 Aug 2026 18:15:27 -0000 (UTC), Eli the Bearded wrote:
> >>>>
> >>>>> In comp.os.linux.misc, Lawrence DOliveiro <ldo@nz.invalid> wrote:
> >>>>>>
> >>>>>> On Thu, 20 Aug 2026 00:59:41 -0000 (UTC), Eli the Bearded wrote:
> >>>>>>>
> >>>>>>> This came up in the context of "how to test network on a system
> >>>>>>> with no root and no helpful utilities installed."
> >>>>>>
> >>>>>> So a version of bash that supports /dev/tcp is somehow excluded
> >>>>>> from that “no helpful utilities installed” assumption?
> >>>>>
> >>>>> The system being tested did not have bash installed. Busybox
> >>>>> provided /bin/sh there.
> >>>>
> >>>> I thought you said you were testing the *network*, not the *system*.
> >>>>
> >>>> You can’t really do that (in general) without access to a proper
> >>>> suite of diagnostic tools.
> >>>>
> >>>> In such a situation, I would try one (or both) of two things:
> >>>>
> >>>> * Reboot the machine with a SystemRescue USB stick
> >>>> <https://www.system-rescue.org/>. That way, I get unconstrained
> >>>> access to an entire system custom-designed precisely for running
> >>>> diagnostics.
> >>>> * Bring in my own machine, which already has my own custom setup on
> >>>> it, and connect it to the network.
> >>>>
> >>>> Both of these also have the advantage of ruling out screwups in the
> >>>> existing OS installation.
> >>>>
> >>>> And if you’re saying the situation would not allow me to do either of
> >>>> these things, then I would not have accepted the job in the first
> >>>> place.
> >>>
> >>> Have you ever agreed with someone?
> >>
> >> It's kind of the troll ethos, disagreeing brings on more chaos.
> >
> >
> > There are always a few ... being negative/disagreeable
> > or, worse, All-Superior is Their Main Thing. They feel
> > they "Gain Power" that way.
> >
> > No, I'm not basing that on Freud or Jung - just long
> > experience.
> >
> > I pref the "Let's All Get Along" approach. Everything
> > goes MUCH smoother and solutions, rather than conflict,
> > is the usual result.
> >
> > ANYway, /dev/tcp does have uses. It's worth exploring.
> > Maybe YOU can find a use to suit YOUR needs/desires.
> > I used it for a custom disk-scan/wipe app (had to
> > use a 'C' module because huge track/cluster/byte numbers
> > were needed for modern mag drives - the main app was
> > in Lazarus for the pretty display and buttons).
> >
> > Note Lazarus/FPC *says* it supports huge seek numbers
> > but DOESN'T ... limited to maybe 4gb.
>
> I wrote a program that writes bytes on big partitions.
>
>
> excerpted:
>
> const
> sourcefilename = './BigRandom';
> rawdest: string = ''; // example: '/dev/sda11'
>
> shuflecount = 1024;
> arraysize = 1023;
> ChunkSz=1048576;
> type
> tCacho= array [1..ChunkSz] of byte;
>
> var
> Fin, Fout: file of tCacho;
> gotresult: Word;
>
> BigData : array [1..shuflecount] of tCacho;
> OutputIndex : Int64; // counts MiB written.
>
>
> begin
>
> // writes one MiB
> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
> gotresult:= ioresult;
>
>
>
> The purpose of the program is to fast fill a partition or disk with
> nearly true random data. It is as fast as dd could be.
SHRED(1) User Commands SHRED(1)
NAME
shred - overwrite a file to hide its contents, and
optionally delete it
SYNOPSIS
shred [OPTION]... FILE...
DESCRIPTION
Overwrite the specified FILE(s) repeatedly, in order to
make it harder for even very expensive hardware probing
to recover the data.
--
-v System76 Thelio Mega v1.1 x86_64 Mem: 258G
OS: Linux 7.2.0 D: Mint 22.3 DE: Xfce 4.18 (X11)
NVIDIA GeForce RTX 3090Ti (24G) (610.57.04)
"Diplomacy is saying "nice doggy" until you find a rock."
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2026-08-24 09:35 +0200 |
| Message-ID | <6r8tlmxeb9.ln2@Telcontar.valinor> |
| In reply to | #90414 |
On 2026-08-24 00:28, vallor wrote:
> At Sun, 23 Aug 2026 13:50:30 +0200, "Carlos E.R." <robin_listas@es.invalid> wrote:
>
>> On 2026-08-23 09:37, c186282 wrote:
>>> On 8/23/26 00:01, Rich wrote:
>>>> vallor <vallor@vallor.earth> wrote:
>>>>> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro
>>>>> <ldo@nz.invalid> wrote:
>>>>>
>>>>>> On Thu, 20 Aug 2026 18:15:27 -0000 (UTC), Eli the Bearded wrote:
>>>>>>
>>>>>>> In comp.os.linux.misc, Lawrence DOliveiro <ldo@nz.invalid> wrote:
>>>>>>>>
>>>>>>>> On Thu, 20 Aug 2026 00:59:41 -0000 (UTC), Eli the Bearded wrote:
>>>>>>>>>
>>>>>>>>> This came up in the context of "how to test network on a system
>>>>>>>>> with no root and no helpful utilities installed."
>>>>>>>>
>>>>>>>> So a version of bash that supports /dev/tcp is somehow excluded
>>>>>>>> from that “no helpful utilities installed” assumption?
>>>>>>>
>>>>>>> The system being tested did not have bash installed. Busybox
>>>>>>> provided /bin/sh there.
>>>>>>
>>>>>> I thought you said you were testing the *network*, not the *system*.
>>>>>>
>>>>>> You can’t really do that (in general) without access to a proper
>>>>>> suite of diagnostic tools.
>>>>>>
>>>>>> In such a situation, I would try one (or both) of two things:
>>>>>>
>>>>>> * Reboot the machine with a SystemRescue USB stick
>>>>>> <https://www.system-rescue.org/>. That way, I get unconstrained
>>>>>> access to an entire system custom-designed precisely for running
>>>>>> diagnostics.
>>>>>> * Bring in my own machine, which already has my own custom setup on
>>>>>> it, and connect it to the network.
>>>>>>
>>>>>> Both of these also have the advantage of ruling out screwups in the
>>>>>> existing OS installation.
>>>>>>
>>>>>> And if you’re saying the situation would not allow me to do either of
>>>>>> these things, then I would not have accepted the job in the first
>>>>>> place.
>>>>>
>>>>> Have you ever agreed with someone?
>>>>
>>>> It's kind of the troll ethos, disagreeing brings on more chaos.
>>>
>>>
>>> There are always a few ... being negative/disagreeable
>>> or, worse, All-Superior is Their Main Thing. They feel
>>> they "Gain Power" that way.
>>>
>>> No, I'm not basing that on Freud or Jung - just long
>>> experience.
>>>
>>> I pref the "Let's All Get Along" approach. Everything
>>> goes MUCH smoother and solutions, rather than conflict,
>>> is the usual result.
>>>
>>> ANYway, /dev/tcp does have uses. It's worth exploring.
>>> Maybe YOU can find a use to suit YOUR needs/desires.
>>> I used it for a custom disk-scan/wipe app (had to
>>> use a 'C' module because huge track/cluster/byte numbers
>>> were needed for modern mag drives - the main app was
>>> in Lazarus for the pretty display and buttons).
>>>
>>> Note Lazarus/FPC *says* it supports huge seek numbers
>>> but DOESN'T ... limited to maybe 4gb.
>>
>> I wrote a program that writes bytes on big partitions.
>>
>>
>> excerpted:
>>
>> const
>> sourcefilename = './BigRandom';
>> rawdest: string = ''; // example: '/dev/sda11'
>>
>> shuflecount = 1024;
>> arraysize = 1023;
>> ChunkSz=1048576;
>> type
>> tCacho= array [1..ChunkSz] of byte;
>>
>> var
>> Fin, Fout: file of tCacho;
>> gotresult: Word;
>>
>> BigData : array [1..shuflecount] of tCacho;
>> OutputIndex : Int64; // counts MiB written.
>>
>>
>> begin
>>
>> // writes one MiB
>> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
>> gotresult:= ioresult;
>>
>>
>>
>> The purpose of the program is to fast fill a partition or disk with
>> nearly true random data. It is as fast as dd could be.
>
> SHRED(1) User Commands SHRED(1)
>
> NAME
> shred - overwrite a file to hide its contents, and
> optionally delete it
>
> SYNOPSIS
> shred [OPTION]... FILE...
>
> DESCRIPTION
> Overwrite the specified FILE(s) repeatedly, in order to
> make it harder for even very expensive hardware probing
> to recover the data.
Not the same thing.
--
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
[toc] | [prev] | [next] | [standalone]
| From | Nuno Silva <nunojsilva@invalid.invalid> |
|---|---|
| Date | 2026-08-24 11:10 +0100 |
| Subject | Overwriting with random data (was: Re: /dev/tcp) |
| Message-ID | <116h5be$2nco1$1@dont-email.me> |
| In reply to | #90443 |
On 2026-08-24, Carlos E.R. wrote:
> On 2026-08-24 00:28, vallor wrote:
>> At Sun, 23 Aug 2026 13:50:30 +0200, "Carlos E.R." <robin_listas@es.invalid> wrote:
>
[snipping a lot to keep this shorter, apologies if I ended up snipping
too much]
>
>>> I wrote a program that writes bytes on big partitions.
>>>
>>>
>>> excerpted:
>>>
>>> const
>>> sourcefilename = './BigRandom';
>>> rawdest: string = ''; // example: '/dev/sda11'
>>>
>>> shuflecount = 1024;
>>> arraysize = 1023;
>>> ChunkSz=1048576;
>>> type
>>> tCacho= array [1..ChunkSz] of byte;
>>>
>>> var
>>> Fin, Fout: file of tCacho;
>>> gotresult: Word;
>>>
>>> BigData : array [1..shuflecount] of tCacho;
>>> OutputIndex : Int64; // counts MiB written.
>>>
>>>
>>> begin
>>>
>>> // writes one MiB
>>> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
>>> gotresult:= ioresult;
>>>
>>>
>>>
>>> The purpose of the program is to fast fill a partition or disk with
>>> nearly true random data. It is as fast as dd could be.
>>
>> SHRED(1) User Commands SHRED(1)
>>
>> NAME
>> shred - overwrite a file to hide its contents, and
>> optionally delete it
>>
>> SYNOPSIS
>> shred [OPTION]... FILE...
>>
>> DESCRIPTION
>> Overwrite the specified FILE(s) repeatedly, in order to
>> make it harder for even very expensive hardware probing
>> to recover the data.
>
> Not the same thing.
IIRC shred can do the same, and on block devices too, what's the
difference here? block sizes?
--
Nuno Silva
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2026-08-24 20:34 +0200 |
| Subject | Re: Overwriting with random data |
| Message-ID | <vefulmxca.ln2@Telcontar.valinor> |
| In reply to | #90446 |
On 2026-08-24 12:10, Nuno Silva wrote:
> On 2026-08-24, Carlos E.R. wrote:
>
>> On 2026-08-24 00:28, vallor wrote:
>>> At Sun, 23 Aug 2026 13:50:30 +0200, "Carlos E.R." <robin_listas@es.invalid> wrote:
>>
> [snipping a lot to keep this shorter, apologies if I ended up snipping
> too much]
>>
>>>> I wrote a program that writes bytes on big partitions.
>>>>
>>>>
>>>> excerpted:
>>>>
>>>> const
>>>> sourcefilename = './BigRandom';
>>>> rawdest: string = ''; // example: '/dev/sda11'
>>>>
>>>> shuflecount = 1024;
>>>> arraysize = 1023;
>>>> ChunkSz=1048576;
>>>> type
>>>> tCacho= array [1..ChunkSz] of byte;
>>>>
>>>> var
>>>> Fin, Fout: file of tCacho;
>>>> gotresult: Word;
>>>>
>>>> BigData : array [1..shuflecount] of tCacho;
>>>> OutputIndex : Int64; // counts MiB written.
>>>>
>>>>
>>>> begin
>>>>
>>>> // writes one MiB
>>>> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
>>>> gotresult:= ioresult;
>>>>
>>>>
>>>>
>>>> The purpose of the program is to fast fill a partition or disk with
>>>> nearly true random data. It is as fast as dd could be.
>>>
>>> SHRED(1) User Commands SHRED(1)
>>>
>>> NAME
>>> shred - overwrite a file to hide its contents, and
>>> optionally delete it
>>>
>>> SYNOPSIS
>>> shred [OPTION]... FILE...
>>>
>>> DESCRIPTION
>>> Overwrite the specified FILE(s) repeatedly, in order to
>>> make it harder for even very expensive hardware probing
>>> to recover the data.
>>
>> Not the same thing.
>
> IIRC shred can do the same, and on block devices too, what's the
> difference here? block sizes?
I mentioned my code because it accesses huge devices in pascal, way
beyond 4G.
c186282 said:
Note Lazarus/FPC *says* it supports huge seek numbers
but DOESN'T ... limited to maybe 4gb.
Some functions work, others don't. This does not work:
const
rawdest: string = ''; // example: '/dev/sda11'
ChunkSz=1048576;
type
tCacho= array [1..ChunkSz] of byte;
var
Fin, Fout: file of tCacho;
begin
rawdest:= ParamStr(1);
writeln('Apparent size of ', rawdest, ' is ', filesize(Fout));
It writes '0' (I am currently erasing an 8TB disk)
Notice that I am not using a file of bytes, but a file of 1 MiB arrays.
And I am not using seek, but writing contiguously.
Now the shred part.
Using true random data is slow, specially if the disk or partition is
very big. Depends on how fast can the machine create new random data
(see man random and urandom). So I do tricks to do it faster. And shred
does it several times.
The algorithm I use is:
Fill a 1 GiB file with true random data.
Read that file into ram.
repeat
take 1 MiB of that and write it into the destination device
advance
Every 100 advances, replace 1 MiB of the array of random bytes
with new random data
until end of device
So, the data is truly random, but used repeatedly (and slowly renovated).
--
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
[toc] | [prev] | [next] | [standalone]
| From | Richard Kettlewell <invalid@invalid.invalid> |
|---|---|
| Date | 2026-08-24 20:57 +0100 |
| Subject | Re: Overwriting with random data |
| Message-ID | <wwvfr03z3ye.fsf@LkoBDZeT.terraraq.uk> |
| In reply to | #90457 |
"Carlos E.R." <robin_listas@es.invalid> writes:
> Using true random data is slow, specially if the disk or partition is
> very big. Depends on how fast can the machine create new random data
> (see man random and urandom). So I do tricks to do it faster.
With very few exceptions nobody uses true random[1] data directly.
/dev/random is a DRBG seeded from the random sources the kernel finds;
shred sees its internal RNG with 32 bytes from the kernel (strace
it...); I don’t know where you’re getting random data from but the
chances that it’s direct from a TRNG are negligible.
[1] in the sense described by
e.g. https://link.springer.com/content/pdf/10.1007/978-3-540-85053-3_10.pdf
--
https://www.greenend.org.uk/rjk/
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2026-08-24 22:26 +0200 |
| Subject | Re: Overwriting with random data |
| Message-ID | <71mulmxumi.ln2@Telcontar.valinor> |
| In reply to | #90463 |
On 2026-08-24 21:57, Richard Kettlewell wrote:
> "Carlos E.R." <robin_listas@es.invalid> writes:
>> Using true random data is slow, specially if the disk or partition is
>> very big. Depends on how fast can the machine create new random data
>> (see man random and urandom). So I do tricks to do it faster.
>
> With very few exceptions nobody uses true random[1] data directly.
> /dev/random is a DRBG seeded from the random sources the kernel finds;
> shred sees its internal RNG with 32 bytes from the kernel (strace
> it...); I don’t know where you’re getting random data from but the
> chances that it’s direct from a TRNG are negligible.
Normally
dd if=/dev/urandom of=$BIGRANDOM count=1024 bs=1M
or in pascal
var
randomsource : file of byte;
x: Integer;
begin
try
assign(randomsource, '/dev/urandom');
reset(randomsource);
for x:= 1 to shuflecount do
read(randomsource, BigData[Index, x]);
finally
close(randomsource);
end;
end;
>
> [1] in the sense described by
> e.g. https://link.springer.com/content/pdf/10.1007/978-3-540-85053-3_10.pdf
>
--
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
[toc] | [prev] | [next] | [standalone]
| From | c186282 <c186282@nnada.net> |
|---|---|
| Date | 2026-08-25 00:37 -0400 |
| Message-ID | <UaqcnZw5f_uEgRD3nZ2dnZfqn_SdnZ2d@giganews.com> |
| In reply to | #90443 |
On 8/24/26 03:35, Carlos E.R. wrote:
> On 2026-08-24 00:28, vallor wrote:
>> At Sun, 23 Aug 2026 13:50:30 +0200, "Carlos E.R."
>> <robin_listas@es.invalid> wrote:
>>
>>> On 2026-08-23 09:37, c186282 wrote:
>>>> On 8/23/26 00:01, Rich wrote:
>>>>> vallor <vallor@vallor.earth> wrote:
>>>>>> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro
>>>>>> <ldo@nz.invalid> wrote:
>>>>>>
>>>>>>> On Thu, 20 Aug 2026 18:15:27 -0000 (UTC), Eli the Bearded wrote:
>>>>>>>
>>>>>>>> In comp.os.linux.misc, Lawrence DOliveiro <ldo@nz.invalid> wrote:
>>>>>>>>>
>>>>>>>>> On Thu, 20 Aug 2026 00:59:41 -0000 (UTC), Eli the Bearded wrote:
>>>>>>>>>>
>>>>>>>>>> This came up in the context of "how to test network on a system
>>>>>>>>>> with no root and no helpful utilities installed."
>>>>>>>>>
>>>>>>>>> So a version of bash that supports /dev/tcp is somehow excluded
>>>>>>>>> from that “no helpful utilities installed” assumption?
>>>>>>>>
>>>>>>>> The system being tested did not have bash installed. Busybox
>>>>>>>> provided /bin/sh there.
>>>>>>>
>>>>>>> I thought you said you were testing the *network*, not the *system*.
>>>>>>>
>>>>>>> You can’t really do that (in general) without access to a proper
>>>>>>> suite of diagnostic tools.
>>>>>>>
>>>>>>> In such a situation, I would try one (or both) of two things:
>>>>>>>
>>>>>>> * Reboot the machine with a SystemRescue USB stick
>>>>>>> <https://www.system-rescue.org/>. That way, I get unconstrained
>>>>>>> access to an entire system custom-designed precisely for running
>>>>>>> diagnostics.
>>>>>>> * Bring in my own machine, which already has my own custom setup on
>>>>>>> it, and connect it to the network.
>>>>>>>
>>>>>>> Both of these also have the advantage of ruling out screwups in the
>>>>>>> existing OS installation.
>>>>>>>
>>>>>>> And if you’re saying the situation would not allow me to do
>>>>>>> either of
>>>>>>> these things, then I would not have accepted the job in the first
>>>>>>> place.
>>>>>>
>>>>>> Have you ever agreed with someone?
>>>>>
>>>>> It's kind of the troll ethos, disagreeing brings on more chaos.
>>>>
>>>>
>>>> There are always a few ... being negative/disagreeable
>>>> or, worse, All-Superior is Their Main Thing. They feel
>>>> they "Gain Power" that way.
>>>>
>>>> No, I'm not basing that on Freud or Jung - just long
>>>> experience.
>>>>
>>>> I pref the "Let's All Get Along" approach. Everything
>>>> goes MUCH smoother and solutions, rather than conflict,
>>>> is the usual result.
>>>>
>>>> ANYway, /dev/tcp does have uses. It's worth exploring.
>>>> Maybe YOU can find a use to suit YOUR needs/desires.
>>>> I used it for a custom disk-scan/wipe app (had to
>>>> use a 'C' module because huge track/cluster/byte numbers
>>>> were needed for modern mag drives - the main app was
>>>> in Lazarus for the pretty display and buttons).
>>>>
>>>> Note Lazarus/FPC *says* it supports huge seek numbers
>>>> but DOESN'T ... limited to maybe 4gb.
>>>
>>> I wrote a program that writes bytes on big partitions.
>>>
>>>
>>> excerpted:
>>>
>>> const
>>> sourcefilename = './BigRandom';
>>> rawdest: string = ''; // example: '/dev/sda11'
>>>
>>> shuflecount = 1024;
>>> arraysize = 1023;
>>> ChunkSz=1048576;
>>> type
>>> tCacho= array [1..ChunkSz] of byte;
>>>
>>> var
>>> Fin, Fout: file of tCacho;
>>> gotresult: Word;
>>>
>>> BigData : array [1..shuflecount] of tCacho;
>>> OutputIndex : Int64; // counts MiB written.
>>>
>>>
>>> begin
>>>
>>> // writes one MiB
>>> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
>>> gotresult:= ioresult;
>>>
>>>
>>>
>>> The purpose of the program is to fast fill a partition or disk with
>>> nearly true random data. It is as fast as dd could be.
>>
>> SHRED(1) User Commands SHRED(1)
>>
>> NAME
>> shred - overwrite a file to hide its contents, and
>> optionally delete it
>>
>> SYNOPSIS
>> shred [OPTION]... FILE...
>>
>> DESCRIPTION
>> Overwrite the specified FILE(s) repeatedly, in order to
>> make it harder for even very expensive hardware probing
>> to recover the data.
>
> Not the same thing.
And NO good for SSDs.
[toc] | [prev] | [next] | [standalone]
| From | c186282 <c186282@nnada.net> |
|---|---|
| Date | 2026-08-24 00:31 -0400 |
| Message-ID | <ViCdnRVVJp6KVBb3nZ2dnZfqnPudnZ2d@giganews.com> |
| In reply to | #90387 |
On 8/23/26 07:50, Carlos E.R. wrote:
> On 2026-08-23 09:37, c186282 wrote:
>> On 8/23/26 00:01, Rich wrote:
>>> vallor <vallor@vallor.earth> wrote:
>>>> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro
>>>> <ldo@nz.invalid> wrote:
>>>>
>>>>> On Thu, 20 Aug 2026 18:15:27 -0000 (UTC), Eli the Bearded wrote:
>>>>>
>>>>>> In comp.os.linux.misc, Lawrence DOliveiro <ldo@nz.invalid> wrote:
>>>>>>>
>>>>>>> On Thu, 20 Aug 2026 00:59:41 -0000 (UTC), Eli the Bearded wrote:
>>>>>>>>
>>>>>>>> This came up in the context of "how to test network on a system
>>>>>>>> with no root and no helpful utilities installed."
>>>>>>>
>>>>>>> So a version of bash that supports /dev/tcp is somehow excluded
>>>>>>> from that “no helpful utilities installed” assumption?
>>>>>>
>>>>>> The system being tested did not have bash installed. Busybox
>>>>>> provided /bin/sh there.
>>>>>
>>>>> I thought you said you were testing the *network*, not the *system*.
>>>>>
>>>>> You can’t really do that (in general) without access to a proper
>>>>> suite of diagnostic tools.
>>>>>
>>>>> In such a situation, I would try one (or both) of two things:
>>>>>
>>>>> * Reboot the machine with a SystemRescue USB stick
>>>>> <https://www.system-rescue.org/>. That way, I get unconstrained
>>>>> access to an entire system custom-designed precisely for running
>>>>> diagnostics.
>>>>> * Bring in my own machine, which already has my own custom setup on
>>>>> it, and connect it to the network.
>>>>>
>>>>> Both of these also have the advantage of ruling out screwups in the
>>>>> existing OS installation.
>>>>>
>>>>> And if you’re saying the situation would not allow me to do either of
>>>>> these things, then I would not have accepted the job in the first
>>>>> place.
>>>>
>>>> Have you ever agreed with someone?
>>>
>>> It's kind of the troll ethos, disagreeing brings on more chaos.
>>
>>
>> There are always a few ... being negative/disagreeable
>> or, worse, All-Superior is Their Main Thing. They feel
>> they "Gain Power" that way.
>>
>> No, I'm not basing that on Freud or Jung - just long
>> experience.
>>
>> I pref the "Let's All Get Along" approach. Everything
>> goes MUCH smoother and solutions, rather than conflict,
>> is the usual result.
>>
>> ANYway, /dev/tcp does have uses. It's worth exploring.
>> Maybe YOU can find a use to suit YOUR needs/desires.
>> I used it for a custom disk-scan/wipe app (had to
>> use a 'C' module because huge track/cluster/byte numbers
>> were needed for modern mag drives - the main app was
>> in Lazarus for the pretty display and buttons).
>>
>> Note Lazarus/FPC *says* it supports huge seek numbers
>> but DOESN'T ... limited to maybe 4gb.
>
> I wrote a program that writes bytes on big partitions.
>
>
> excerpted:
>
> const
> sourcefilename = './BigRandom';
> rawdest: string = ''; // example: '/dev/sda11'
>
> shuflecount = 1024;
> arraysize = 1023;
> ChunkSz=1048576;
> type
> tCacho= array [1..ChunkSz] of byte;
>
> var
> Fin, Fout: file of tCacho;
> gotresult: Word;
>
> BigData : array [1..shuflecount] of tCacho;
> OutputIndex : Int64; // counts MiB written.
>
>
> begin
>
> // writes one MiB
> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
> gotresult:= ioresult;
>
>
> The purpose of the program is to fast fill a partition or disk with
> nearly true random data. It is as fast as dd could be.
Um ... how many GB could that cope with ?
'Seek' counts can sometimes be supplimented
by an 'offset' value - so basically you're
getting the mult of two doubles. I didn't
do it that way, and thus needed very large
sector/track/cluster integers. An external 'C'
pgm using really large integer types was needed.
Anyway, it worked.
My app could ALSO just LOOK at data, kinda put
it into a "ghex"-looking sidebar (but with
ASCII translation if possible). So you could
just look, OR zap. Anyway, nothing TOO complex
aside from the sheer size of modern mag disks.
As useful utility. I encourage people to write
their own.
DID add one odd, maybe questionable, feature ...
you could spec on the CL x-number of gigs to
TOTALLY wipe at the beginning ... and then
a couple numbers for "shotgun" blasting of
later tracks. Most of the file-table/system
stuff tends to be early on, and data with
holes in it is "less useful". This made the
"wipes" much faster.
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2026-08-24 09:45 +0200 |
| Message-ID | <jd9tlmxhcg.ln2@Telcontar.valinor> |
| In reply to | #90426 |
On 2026-08-24 06:31, c186282 wrote:
> On 8/23/26 07:50, Carlos E.R. wrote:
>> On 2026-08-23 09:37, c186282 wrote:
>>> On 8/23/26 00:01, Rich wrote:
>>>> vallor <vallor@vallor.earth> wrote:
>>>>> At Thu, 20 Aug 2026 23:30:40 -0000 (UTC), Lawrence D’Oliveiro
>>>>> <ldo@nz.invalid> wrote:
>>> ANYway, /dev/tcp does have uses. It's worth exploring.
>>> Maybe YOU can find a use to suit YOUR needs/desires.
>>> I used it for a custom disk-scan/wipe app (had to
>>> use a 'C' module because huge track/cluster/byte numbers
>>> were needed for modern mag drives - the main app was
>>> in Lazarus for the pretty display and buttons).
>>>
>>> Note Lazarus/FPC *says* it supports huge seek numbers
>>> but DOESN'T ... limited to maybe 4gb.
>>
>> I wrote a program that writes bytes on big partitions.
>>
>>
>> excerpted:
>>
>> const
>> sourcefilename = './BigRandom';
>> rawdest: string = ''; // example: '/dev/sda11'
>>
>> shuflecount = 1024;
>> arraysize = 1023;
>> ChunkSz=1048576;
>> type
>> tCacho= array [1..ChunkSz] of byte;
>>
>> var
>> Fin, Fout: file of tCacho;
>> gotresult: Word;
>>
>> BigData : array [1..shuflecount] of tCacho;
>> OutputIndex : Int64; // counts MiB written.
>>
>>
>> begin
>>
>> // writes one MiB
>> {$I-}write(Fout,BigData[RandomIndex]);{$I+}
>> gotresult:= ioresult;
>>
>>
>> The purpose of the program is to fast fill a partition or disk with
>> nearly true random data. It is as fast as dd could be.
>
> Um ... how many GB could that cope with ?
I have done entire disks sized terabytes. But I don't actually use "seek".
>
> 'Seek' counts can sometimes be supplimented
> by an 'offset' value - so basically you're
> getting the mult of two doubles. I didn't
> do it that way, and thus needed very large
> sector/track/cluster integers. An external 'C'
> pgm using really large integer types was needed.
Can you seek not a byte, but a record or array?
Seek(var F; N: Int64)
File can be a file of some variable that is not a byte. And
type Int64 = - 9223372036854775808..9223372036854775807;
(why signed?)
Why not QWord?
type QWord = 0..18446744073709551615;
> Anyway, it worked.
>
> My app could ALSO just LOOK at data, kinda put
> it into a "ghex"-looking sidebar (but with
> ASCII translation if possible). So you could
> just look, OR zap. Anyway, nothing TOO complex
> aside from the sheer size of modern mag disks.
>
> As useful utility. I encourage people to write
> their own.
>
> DID add one odd, maybe questionable, feature ...
> you could spec on the CL x-number of gigs to
> TOTALLY wipe at the beginning ... and then
> a couple numbers for "shotgun" blasting of
> later tracks. Most of the file-table/system
> stuff tends to be early on, and data with
> holes in it is "less useful". This made the
> "wipes" much faster.
>
--
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2026-08-23 12:52 +0100 |
| Message-ID | <116emud$1sako$6@dont-email.me> |
| In reply to | #90376 |
On 23/08/2026 08:37, c186282 wrote: > There are always a few ... being negative/disagreeable > or, worse, All-Superior is Their Main Thing. They feel > they "Gain Power" that way. I think they just get a kick out of being responded to. It's sort of an idle occupation, like swatting flies or doodling. Piss someone off on the Internet. Imagine some guy on second line support who spends his life on front of a screen with nothing to do until shit happens -- "The great thing about Glasgow is that if there's a nuclear attack it'll look exactly the same afterwards." Billy Connolly
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2026-08-23 12:50 +0100 |
| Message-ID | <116emqf$1sako$5@dont-email.me> |
| In reply to | #90370 |
On 23/08/2026 05:01, Rich wrote: >> Have you ever agreed with someone? > It's kind of the troll ethos, disagreeing brings on more chaos. LOL... -- "The great thing about Glasgow is that if there's a nuclear attack it'll look exactly the same afterwards." Billy Connolly
[toc] | [prev] | [next] | [standalone]
| From | Rich <rich@example.invalid> |
|---|---|
| Date | 2026-08-20 13:50 +0000 |
| Message-ID | <11670nh$3hihn$1@dont-email.me> |
| In reply to | #90165 |
Eli the Bearded <*@eli.users.panix.com> wrote: > What system(s) have /dev/tcp/* natively? What "systems"? Only those with a /bin/bash compiled with this "special bash feature" compiled in. > $ man bash > [...] > REDIRECTION > [...] > Bash handles several filenames specially when they are used in > redirections, as described in the following table. If the > operating system on which bash is running provides these > special files, bash will use them; other wise it will emulate > them internally with the behavior described below. > [...] > /dev/tcp/host/port > If host is a valid hostname or Internet address, > and port is an integer port number or service name, > bash attempts to open the corresponding TCP socket. > > I don't see it on the various systems I have handy (Debian 13, Amazon > Linux 2023, Mac OS 15.7.x, NetBSD 10.1, Android 14). > is it a plan9 thing? It's a Bash feature. Note the man page quote you provided: > **Bash** handles several filenames specially when they are used in > redirections These are handled by Bash, they don't exist as part of the OS (system).
[toc] | [prev] | [next] | [standalone]
| From | c186282 <c186282@nnada.net> |
|---|---|
| Date | 2026-08-20 13:02 -0400 |
| Message-ID | <jLednbRwA9SGrhr3nZ2dnZfqn_udnZ2d@giganews.com> |
| In reply to | #90207 |
On 8/20/26 09:50, Rich wrote: > Eli the Bearded <*@eli.users.panix.com> wrote: >> What system(s) have /dev/tcp/* natively? > > What "systems"? Only those with a /bin/bash compiled with this > "special bash feature" compiled in. > >> $ man bash >> [...] >> REDIRECTION >> [...] >> Bash handles several filenames specially when they are used in >> redirections, as described in the following table. If the >> operating system on which bash is running provides these >> special files, bash will use them; other wise it will emulate >> them internally with the behavior described below. >> [...] >> /dev/tcp/host/port >> If host is a valid hostname or Internet address, >> and port is an integer port number or service name, >> bash attempts to open the corresponding TCP socket. >> >> I don't see it on the various systems I have handy (Debian 13, Amazon >> Linux 2023, Mac OS 15.7.x, NetBSD 10.1, Android 14). > >> is it a plan9 thing? > > It's a Bash feature. Note the man page quote you provided: > >> **Bash** handles several filenames specially when they are used in >> redirections > > These are handled by Bash, they don't exist as part of the OS (system). Correct. I've used the /dev/tcp trick before to check ports. Seems to only work with Bash. Others might add it eventually, but not too likely. Other odd Linux tricks - how many know you can read/write to a disk drive that has no file system ? GParted does have an option that creates a "blank" drive. It's an old trick, squeeze in more raw data. To a degree, it can make that data a bit more "portable" because it's not tied to EXT?/NTFS/XFS/etc. You just need a system that can open the 'blank' as an I/O device.
[toc] | [prev] | [next] | [standalone]
| From | Rich <rich@example.invalid> |
|---|---|
| Date | 2026-08-20 18:26 +0000 |
| Message-ID | <1167gt3$3neg1$1@dont-email.me> |
| In reply to | #90219 |
c186282 <c186282@nnada.net> wrote: > Other odd Linux tricks - how many know you can > read/write to a disk drive that has no file > system ? That is not a Linux trick, that's a Unix feature given that devices are mapped to files. Just write your data to /dev/sda (whole disk, including boot sector) or /dev/sda5 (5th partition on disk). That is where the 'dd' command is useful. You can "clone" a disk on Unix (if you are root, or if the two disk device files have write permission for your current user) by just doing: dd if=/dev/sda of=/dev/sdb bs=4096 Assuming the disks use 4096 byte sectors. No need for extra "disk cloning" machines to actually duplicate a disk. You can also backup the same way (although it is a rather wasteful way, as you also backup all the empty "free space" too): dd if=/dev/sda of=/tmp/disk-backup bs=4096 None of this is new to anyone who's used, and understood from an admin perspective, a Unix system for any short length of time.
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2026-08-21 13:54 +0100 |
| Message-ID | <1169hp9$9sqa$13@dont-email.me> |
| In reply to | #90219 |
On 20/08/2026 18:02, c186282 wrote: > Other odd Linux tricks - how many know you can > read/write to a disk drive that has no file > system ? Of course. Done all the time with floppies Just write to the raw device. After all, at some level some part of Linux has to do that anyway even if it is writing to a file. -- "An intellectual is a person knowledgeable in one field who speaks out only in others...” Tom Wolfe
[toc] | [prev] | [next] | [standalone]
| From | c186282 <c186282@nnada.net> |
|---|---|
| Date | 2026-08-21 22:57 -0400 |
| Message-ID | <36ucnepaq_p9khT3nZ2dnZfqnPednZ2d@giganews.com> |
| In reply to | #90281 |
On 8/21/26 08:54, The Natural Philosopher wrote: > On 20/08/2026 18:02, c186282 wrote: >> Other odd Linux tricks - how many know you can >> read/write to a disk drive that has no file >> system ? > Of course. Done all the time with floppies > > Just write to the raw device. > > After all, at some level some part of Linux has to do that anyway even > if it is writing to a file. It used to be popular for holding the max amount of binary data - no space wasted with the file system setup. A few years back I leveraged it for a disk-wipe program. Problem was that disks have become SO huge ... had to use M$ 128/256-bit var classes to access the whole thing. E-Disks ... can't REALLY wipe 'em alas. There are hidden buffers plus the wear-leveling scheme gets in the way. You wipe 'em the Hillary Clinton way - HAMMER :-)
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2026-08-22 21:47 +0200 |
| Message-ID | <fvaplmx3co.ln2@Telcontar.valinor> |
| In reply to | #90314 |
On 2026-08-22 04:57, c186282 wrote: > On 8/21/26 08:54, The Natural Philosopher wrote: >> On 20/08/2026 18:02, c186282 wrote: >>> Other odd Linux tricks - how many know you can >>> read/write to a disk drive that has no file >>> system ? >> Of course. Done all the time with floppies >> >> Just write to the raw device. >> >> After all, at some level some part of Linux has to do that anyway even >> if it is writing to a file. > > It used to be popular for holding the max amount > of binary data - no space wasted with the file > system setup. > > A few years back I leveraged it for a disk-wipe > program. Problem was that disks have become SO > huge ... had to use M$ 128/256-bit var classes to > access the whole thing. > > E-Disks ... can't REALLY wipe 'em alas. There > are hidden buffers plus the wear-leveling scheme > gets in the way. You wipe 'em the Hillary Clinton > way - HAMMER :-) Instead, use encryption, on the device or the partitions. -- Cheers, Carlos. ES🇪🇸, EU🇪🇺;
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2026-08-22 23:50 +0000 |
| Subject | The hammer is best (Was: /dev/tcp) |
| Message-ID | <116dcl1$3hva0$1@news.xmission.com> |
| In reply to | #90353 |
In article <fvaplmx3co.ln2@Telcontar.valinor>, Carlos E.R. <robin_listas@es.invalid> wrote: ... >> are hidden buffers plus the wear-leveling scheme >> gets in the way. You wipe 'em the Hillary Clinton >> way - HAMMER :-) > >Instead, use encryption, on the device or the partitions. Hammer is better, because encryption can be worked around by holding a gun to the head of the person who knows the encryption key. But a hammer is forever. -- Trump has normalized hate. The media has normalized Trump.
[toc] | [prev] | [next] | [standalone]
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
Back to top | Article view | comp.os.linux.misc
csiph-web