Re: Creation of empty files [was: Useful use of dd]

2021-07-03 Thread Michael Stone
On Sat, Jul 03, 2021 at 02:34:56PM -0700, David Christensen wrote: On 7/3/21 6:44 AM, Michael Stone wrote: On Fri, Jul 02, 2021 at 02:30:50PM -0700, David Christensen wrote: 2021-07-02 14:24:30 dpchrist@dipsy ~/sandbox/dd $ du --bytes truncate-sparse 5242880    truncate-sparse I expected spar

Re: Creation of empty files [was: Useful use of dd]

2021-07-03 Thread David Christensen
On 7/3/21 6:44 AM, Michael Stone wrote: On Fri, Jul 02, 2021 at 02:30:50PM -0700, David Christensen wrote: 2021-07-02 14:24:30 dpchrist@dipsy ~/sandbox/dd $ du --bytes truncate-sparse 5242880    truncate-sparse I expected sparse files, but du(1) does not indicate such (?). You used --bytes,

Re: Creation of empty files [was: Useful use of dd]

2021-07-03 Thread Michael Stone
On Fri, Jul 02, 2021 at 02:30:50PM -0700, David Christensen wrote: 2021-07-02 14:24:30 dpchrist@dipsy ~/sandbox/dd $ du --bytes truncate-sparse 5242880 truncate-sparse I expected sparse files, but du(1) does not indicate such (?). You used --bytes, which per the man page implies --apparent-si

Re: Useless use of shell pipelines [was: Useful use of dd]

2021-07-03 Thread Greg Wooledge
On Sat, Jul 03, 2021 at 10:23:39AM +0200, l0f...@tuta.io wrote: > 2 juil. 2021, 23:30 de dpchr...@holgerdanske.com: > > $ cat useless-use-of-grep > > This is the first line: bla bla bla. > > This is line : bla bla bla. > > This is the last line: bla bla bla. > Here is a better `sed` if you wan

Re: Useless use of shell pipelines [was: Useful use of dd]

2021-07-03 Thread l0f4r0
Hi, 2 juil. 2021, 23:30 de dpchr...@holgerdanske.com: > Perhaps the underlying issue is useless use of shell pipelines ("The Unix > Way"): > > 2021-07-02 12:44:43 dpchrist@dipsy ~/sandbox/perl > $ cat useless-use-of-grep > This is the first line: bla bla bla. > This is line : bla bla bla. >

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-03 Thread tomas
On Sat, Jul 03, 2021 at 10:14:46AM +0300, Gunnar Gervin wrote: > Hi, Debian user 'club': > How can I get off this list in Android mobile? No idea about Android mobile (whatever that is ;-) but every mail you receive via this list carries the instructions. Look at the headers (however your mail cli

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-03 Thread Gunnar Gervin
Hi, Debian user 'club': How can I get off this list in Android mobile? It's filling my mailbox; 5-10 emails a day!!! Gunnar On Fri, 2 Jul 2021, 18:03 David Wright, wrote: > On Fri 02 Jul 2021 at 13:35:17 (+0200), to...@tuxteam.de wrote: > > On Fri, Jul 02, 2021 at 07:31:24AM -0400, Greg Wooledge

Re: Creation of empty files [was: Useful use of dd]

2021-07-02 Thread David Christensen
On 7/2/21 2:30 PM, David Christensen wrote: I expected sparse files, but du(1) does not indicate such (?). Comments? RTFM ls(1) and the '-s' and '--block-size' options. David

Re: Useful use of dd

2021-07-02 Thread David Christensen
On 7/2/21 4:25 AM, Teemu Likonen wrote: * 2021-07-02 12:52:53+0200, Thomas Schmitt wrote: Teemu Likonen wrote: For this new subject I will add another use: quickly create empty file of specific size, for example 5 * 1024 bytes: $ dd of=empty obs=1024 seek=5 count=0 Not to forget creation

Creation of empty files [was: Useful use of dd]

2021-07-02 Thread David Christensen
On 7/2/21 11:51 AM, Kushal Kumaran wrote: On Fri, Jul 02 2021 at 01:26:23 PM, Teemu Likonen wrote: For this new subject I will add another use: quickly create empty file of specific size, for example 5 * 1024 bytes: $ dd of=empty obs=1024 seek=5 count=0 2021-07-02 14:20:47 dpchrist@d

Useless use of shell pipelines [was: Useful use of dd]

2021-07-02 Thread David Christensen
On 7/2/21 12:49 AM, to...@tuxteam.de wrote: Now to another pet peeve of mine: useless use of grep: grep | sed -e 's/bla/foo/' ... Perhaps the underlying issue is useless use of shell pipelines ("The Unix Way"): 2021-07-02 12:44:43 dpchrist@dipsy ~/sandbox/perl $ cat useless-use-o

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread Kushal Kumaran
On Fri, Jul 02 2021 at 01:26:23 PM, Teemu Likonen wrote: > * 2021-07-02 09:49:23+0200, to...@tuxteam.de wrote: > >> FWIW, I've found something which could be deemed to be an "useful use >> of dd" which somehow bears a hidden symmetry. As a replacement for >>

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread tomas
On Fri, Jul 02, 2021 at 10:02:49AM -0500, David Wright wrote: > On Fri 02 Jul 2021 at 13:35:17 (+0200), to...@tuxteam.de wrote: [...] > > Eek. Thanks. > > This reminds me of the sentiment expressed in > https://lists.debian.org/debian-user/2019/08/msg01454.html :-) Cheers - t signature.asc

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread David Wright
On Fri 02 Jul 2021 at 13:35:17 (+0200), to...@tuxteam.de wrote: > On Fri, Jul 02, 2021 at 07:31:24AM -0400, Greg Wooledge wrote: > > On Fri, Jul 02, 2021 at 09:49:23AM +0200, to...@tuxteam.de wrote: > > > sudo dd of=/etc/hosts oflags=append > > > > This appears to be a typo for "oflag=append", w

Re: Useful use of dd

2021-07-02 Thread Michael Stone
: FWIW, I've found something which could be deemed to be an "

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread tomas
On Fri, Jul 02, 2021 at 07:31:24AM -0400, Greg Wooledge wrote: > On Fri, Jul 02, 2021 at 09:49:23AM +0200, to...@tuxteam.de wrote: > > sudo dd of=/etc/hosts oflags=append > > This appears to be a typo for "oflag=append", which is a GNU extension, > not part of the standard POSIX dd. No wonder I

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread Greg Wooledge
On Fri, Jul 02, 2021 at 09:49:23AM +0200, to...@tuxteam.de wrote: > sudo dd of=/etc/hosts oflags=append This appears to be a typo for "oflag=append", which is a GNU extension, not part of the standard POSIX dd. No wonder I didn't know about it. ;-) The bullseye version of GNU coreutils dd also

Re: Useful use of dd

2021-07-02 Thread Teemu Likonen
* 2021-07-02 12:52:53+0200, Thomas Schmitt wrote: > Teemu Likonen wrote: >> For this new subject I will add another use: quickly create empty file >> of specific size, for example 5 * 1024 bytes: >>$ dd of=empty obs=1024 seek=5 count=0 > > Not to forget creation of sparse files with few disk c

Re: Useful use of dd

2021-07-02 Thread tomas
On Fri, Jul 02, 2021 at 12:52:53PM +0200, Thomas Schmitt wrote: > Hi, > > Teemu Likonen wrote: > > For this new subject I will add another use: quickly create empty file > > of specific size, for example 5 * 1024 bytes: > >$ dd of=empty obs=1024 seek=5 count=0 > > Not to forget creation of sp

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread tomas
On Fri, Jul 02, 2021 at 01:26:23PM +0300, Teemu Likonen wrote: > * 2021-07-02 09:49:23+0200, to...@tuxteam.de wrote: > > > FWIW, I've found something which could be deemed to be an "useful use > > of dd" which somehow bears a hidden symmetry. As a replacement f

Re: Useful use of dd

2021-07-02 Thread Thomas Schmitt
Hi, Teemu Likonen wrote: > For this new subject I will add another use: quickly create empty file > of specific size, for example 5 * 1024 bytes: >$ dd of=empty obs=1024 seek=5 count=0 Not to forget creation of sparse files with few disk consumption. For testing zisofs i have this in a scrip

Re: Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread Teemu Likonen
* 2021-07-02 09:49:23+0200, to...@tuxteam.de wrote: > FWIW, I've found something which could be deemed to be an "useful use > of dd" which somehow bears a hidden symmetry. As a replacement for > `cat' whenever you need to put a name on the output file. For this new s

Useful use of dd [was: Useless use of "dd"]

2021-07-02 Thread tomas
se of cat". FWIW, I've found something which could be deemed to be an "useful use of dd" which somehow bears a hidden symmetry. As a replacement for `cat' whenever you need to put a name on the output file. I'll try to explain: sometimes, you use `cat' to popul