[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: touching "-"
From: |
Eric Blake |
Subject: |
Re: touching "-" |
Date: |
Wed, 9 Dec 2009 02:22:15 +0000 (UTC) |
> $ touch - && echo ok
> ok
Not a bug - you successfully touched stdout (in this case,
your terminal). Remember, many commands special case - to
mean stdin or stdout if they operate well on a single file.
>
> $ ls -
> ls: cannot access -: No such file or directory
ls is not one of those commands. So rather than listing
stdin or stdout (neither of which makes sense), it tries
to list ./- and fails.
If you really must touch ./-, then say so:
touch ./-
--
Eric Blake
- touching "-", antonio, 2009/12/08
- Re: touching "-",
Eric Blake <=