sudo issue

Karl Auer kauer at biplane.com.au
Tue Aug 2 13:44:27 UTC 2016


On Tue, 2016-08-02 at 23:00 +1000, blind Pete wrote:
> You could probably pass the wild card, rather than what the 
> wild card expands to (as Ralf), to sudo by escaping it.  
> 
>   $ sudo cp -rp /mnt/archlinux/.chuser/.home/.jwm\* /tmp/

Sadly no - because sudo does not execute the command in a shell, so
arguments passed to it are not processed as a shell would.

   kauer at kt:~$ sudo ls /root
   z1.txt
   kauer at kt:~$ sudo ls /root/z\*
   ls: cannot access '/root/z*': No such file or directory

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