Amedee Van Gasse (ub)
amedee-ubuntu at amedee.be
Tue Jan 26 23:39:10 UTC 2010
On Tue, January 26, 2010 23:12, nepal wrote:
> On Tuesday 26 Jan 2010 21:03:53 Linda wrote:
>> Is there a way to make ls silent if there is no match? I'm not
>> finding it in the options, but am hoping I'm just reading over it
>> in the man page. Thanks
> Hi Linda
> File a bug report!
> The correct response to *ls* for a non-existent target should be an
> empty list.
Not true. For example:
amedee at intrepid:~/download$ ls q*
ls: kan geen toegang krijgen tot q*: Bestand of map bestaat niet
As an alternative, you could use find with xargs and feed that to ls. If
find doesn't find anything, nothing will be sent to ls and no output will
As an additional advantage, this solves problems when you have directories
with thousands or millions of files.
More information about the ubuntu-users