Re: mkdir and ls display

2015-11-16 Thread Bob Proulx
Pádraig Brady wrote: > Ngô Huy wrote: > > > I had problem with mkdir and ls when I used command: > > > > > > mkdir "* /" && mkdir "* /etc" && ls. > > > > > > It only displayed *. > > > > Note as yet unreleased version of ls will use shell quoting > > to give a less

Re: mkdir and ls display

2015-11-09 Thread Pádraig Brady
On 09/11/15 14:54, Ngô Huy wrote: > Dear Padraig, > > 2015-11-09 18:20 GMT+07:00 Pádraig Brady >: > > On 09/11/15 08:30, Ngô Huy wrote: > > Dear guys, > > > > I had problem with mkdir and ls when I used command: > > > >

Re: mkdir and ls display

2015-11-09 Thread Ngô Huy
Dear Padraig, 2015-11-09 18:20 GMT+07:00 Pádraig Brady : > On 09/11/15 08:30, Ngô Huy wrote: > > Dear guys, > > > > I had problem with mkdir and ls when I used command: > > > > mkdir "* /" && mkdir "* /etc" && ls. > > > > It only displayed *. > > Note as yet unreleased

Re: mkdir and ls display

2015-11-09 Thread Stephane Chazelas
2015-11-09 11:20:20 +, Pádraig Brady: [...] > In any case you can use `find ... -print0 | xargs -0` > to handle that. [...] Note that that is the FreeBSD syntax, with GNU xargs, you need: find ... -print0 | xargs -r0 ... So that ... be not executed when find produces no output. Or you can

mkdir and ls display

2015-11-09 Thread Ngô Huy
Dear guys, I had problem with mkdir and ls when I used command: mkdir "* /" && mkdir "* /etc" && ls. It only displayed *. But find . -type -d -print display ./* /etc. If we have hidden directory and use xargs with find to execute some command, it's security risk. Should we patch it's

Re: mkdir and ls display

2015-11-09 Thread Pádraig Brady
On 09/11/15 08:30, Ngô Huy wrote: > Dear guys, > > I had problem with mkdir and ls when I used command: > > mkdir "* /" && mkdir "* /etc" && ls. > > It only displayed *. Note as yet unreleased version of ls will use shell quoting to give a less ambiguous output: $ ls '* ' > But > > find .