[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



On Fri, Jul 02 2021 at 01:26:23 PM, Teemu Likonen <tlikonen@iki.fi> wrote:
> * 2021-07-02 09:49:23+0200, tomas@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 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

There's

    $ truncate --size 5k testfile

for this purpose.

-- 
regards,
kushal


Reply to: