sudo issue
Karl Auer
kauer at biplane.com.au
Mon Aug 1 11:54:57 UTC 2016
On Mon, 2016-08-01 at 13:41 +0200, Ralf Mardorf wrote:
> Another alternative would be to use a bashism, since e.g.
> $ sudo cp -rp /mnt/archlinux/.chuser/.home/.jwm{rc,foo} /tmp/
> works.
That is an explicit set of alternatives. That's why it works - bash
expands that to a list of paths, but generating the list does not
require access to the filesystem.
That solution only works if you are able to list every alternative in
advance. And it will throw up errors for every variant that does not
exist:
kauer at kt:~$ ls z*.txt
z1.txt
kauer at kt:~$ ls z{1,2}.txt
ls: cannot access 'z2.txt': No such file or directory
z1.txt
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389
GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
More information about the ubuntu-users
mailing list