Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #190071

Re: BeFS or BFS or other filesystem for linux with attributes on debian

From Dan Hitt <dan.hitt@gmail.com>
Newsgroups linux.debian.user
Subject Re: BeFS or BFS or other filesystem for linux with attributes on debian
Date 2017-12-21 00:10 +0100
Message-ID <uYVER-2Xh-3@gated-at.bofh.it> (permalink)
References (1 earlier) <uYuY2-1YH-13@gated-at.bofh.it> <uYvr3-2pp-7@gated-at.bofh.it> <uYvr3-2pp-5@gated-at.bofh.it> <uYyff-4mJ-3@gated-at.bofh.it> <uYGPw-1Ok-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Dec 19, 2017 at 11:16 PM, David Christensen
<dpchrist@holgerdanske.com> wrote:
> On 12/19/17 14:07, Dan Hitt wrote:
>>
>> Just for reference, although the attributes exist and i ithink are
>> exactly what i need, it looks like the system has to be nudged a
>> little to use them.
>>
>> So, for example, with cp, you need to do 'cp -a' to carry along the
>> attributes ('cp -p' is not enough).
>>
>> Also, it looks like tar has to be told about the attributes both on
>> the way in and on the way out:
>> tar --xattr -cf my_archive.tar my_file
>> tar --xattr -xf my_archive.tar

I goofed here, should have been
    tar --xattrs -cf my_archive.tar my_file
    tar --xattrs -xf my_archive.tar


>>
>> It would be nice if the system could be told to use attributes by default.
>
>
> How about using aliases?
>
>
> For example, in my ~/.bashrc:
>
>     alias cp='cp -ip'
>     alias mv='mv -i'
>
>
> See bash(1) ALIASES.
>
>
> David
>

Thanks David.

That's a good idea, so i aliased cp to '/bin/cp -ai'

It was a little more problematic for tar (for me, at least), and i
also goofed on the tar command above :(  (correction inline).

For tar, when you use the '--xattrs' option, then you must precede
your 'cf' or 'xf' with a dash.  So an alias of tar='tar --xattrs'
changes how you type your tar command.  (But maybe that's just a poor
choice of alias for me.)

And there's another very common program, for me, anyway, which is rsync.

For rsync, you need to add the -X option.

So i also aliased that (rsync=/usr/bin/rsync -X).

So i do still think that a global option would be useful, as the
commands with options for paying attention to attributes keep
dribbling in, but your alias idea is very helpful.

One other point on this whole attr business is that apparently the
attr program only acts on one file at a time.

That point however i can't really complain about, because if i'm
unhappy, i can just write my own attr program which will allow
multiple files to be specified.   And for my use case, i probably
won't have to use attr so much anyway (just the attributes themselves,
via the interface that Roberto pointed out).

Thanks again everybody for your help, and thanks Tomas for pulling me
out of the dark ages!! :)

dan

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

BeFS or BFS or other filesystem for linux with attributes on debian Dan Hitt <dan.hitt@gmail.com> - 2017-12-19 19:30 +0100
  Re: BeFS or BFS or other filesystem for linux with attributes on  debian <tomas@tuxteam.de> - 2017-12-19 19:40 +0100
    Re: BeFS or BFS or other filesystem for linux with attributes on  debian Roberto C. Sánchez <roberto@debian.org> - 2017-12-19 20:10 +0100
      Re: BeFS or BFS or other filesystem for linux with attributes on  debian Roberto C. Sánchez <roberto@debian.org> - 2017-12-19 23:10 +0100
      Re: BeFS or BFS or other filesystem for linux with attributes on debian Dan Hitt <dan.hitt@gmail.com> - 2017-12-19 23:10 +0100
        Re: BeFS or BFS or other filesystem for linux with attributes on  debian David Christensen <dpchrist@holgerdanske.com> - 2017-12-20 08:20 +0100
          Re: BeFS or BFS or other filesystem for linux with attributes on debian Dan Hitt <dan.hitt@gmail.com> - 2017-12-21 00:10 +0100
    Re: BeFS or BFS or other filesystem for linux with attributes on debian Dan Hitt <dan.hitt@gmail.com> - 2017-12-19 20:10 +0100

csiph-web