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

Re: Howto?



On Sunday 26 January 2020 03:20:38 David Christensen wrote:

> On 2020-01-26 00:03, Gene Heskett wrote:
> > Greetings all;
> >
> > Trying to sort out how to xz compress.  But xz is rejecting
> > directories, like it expects tars output as its input. And the 
> > manpage is silent on redirections.
> >
> > I want to compress the directory foo into foo.xz, keeping foo as
> > there may be further patches applied in the future.
> >
> > Syntax?
> >
> > Thanks.
> >
> > Cheers, Gene Heskett
>
> 2020-01-26 00:11:46 dpchrist@tinkywinky ~
> $ mkdir foo
>
> 2020-01-26 00:11:53 dpchrist@tinkywinky ~
> $ touch foo/bar
>
> 2020-01-26 00:11:56 dpchrist@tinkywinky ~
> $ touch foo/baz
>
> 2020-01-26 00:11:58 dpchrist@tinkywinky ~
> $ touch foo/qux
>
> 2020-01-26 00:16:42 dpchrist@tinkywinky ~
> $ tar -cJvf foo.tar.xz foo
> foo/
> foo/bar
> foo/baz
> foo/qux
>
> 2020-01-26 00:16:55 dpchrist@tinkywinky ~
> $ ll -R foo*
> -rw-r--r-- 1 dpchrist dpchrist 208 2020-01-26 00:16:55 foo.tar.xz
>
> foo:
> total 0
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:11:56 bar
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:11:58 baz
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:12:06 qux
>
> 2020-01-26 00:17:29 dpchrist@tinkywinky ~
> $ mv foo frobnicate
>
> 2020-01-26 00:17:53 dpchrist@tinkywinky ~
> $ tar -xJvf foo.tar.xz
> foo/
> foo/bar
> foo/baz
> foo/qux
>
> 2020-01-26 00:18:02 dpchrist@tinkywinky ~
> $ ll -R foo frobnicate
> foo:
> total 0
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:11:56 bar
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:11:58 baz
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:12:06 qux
>
> frobnicate:
> total 0
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:11:56 bar
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:11:58 baz
> -rw-r--r-- 1 dpchrist dpchrist 0 2020-01-26 00:12:06 qux
>
> 2020-01-26 00:18:20 dpchrist@tinkywinky ~
> $ file foo.tar.xz
> foo.tar.xz: XZ compressed data
>
> 2020-01-26 00:19:39 dpchrist@tinkywinky ~
> $ unxz foo.tar.xz
>
> 2020-01-26 00:20:02 dpchrist@tinkywinky ~
> $ ll foo.tar
> -rw-r--r-- 1 dpchrist dpchrist 10240 2020-01-26 00:16:55 foo.tar
>
> 2020-01-26 00:20:09 dpchrist@tinkywinky ~
> $ file foo.tar
> foo.tar: POSIX tar archive (GNU)
>
>
> David

I have very little idea what all that was supposed to do, but I did 
figure out how to tar it, then xz the resultant a.tar. Thats working now 
and looks like it might be done in another hour. Big, ready built, rt 
kernel for an rpi4. I'd luv to be able to make a deb as it would be 5% 
of the size of this. or less. All the deb needs to do is:

sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays
sudo cp arch/arm/boot/zImage /boot/kernel7l.img

And reboot the pi.
So all the deb really needs is the data to satisfy the cp's above.

Thanks.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>


Reply to: