Re: Showing hidden files

From: Chris F.A. Johnson (c.fa.johnson_at_rogers.com)
Date: 03/12/04


Date: 11 Mar 2004 23:16:39 GMT

On Thu, 11 Mar 2004 at 22:55 GMT, Kris wrote:
> If I wanted to write a command sequence that lists only the hidden
> files in the current directory what would I write?

   Take your pick:

echo .*
ls .*
printf "%s\n" .*
any_command .*

   In other words, the shell expands .* to a list of all the files in
   the current directory that begin with a dot. Note that that also
   includes "." and "..".

-- 
    Chris F.A. Johnson                  http://cfaj.freeshell.org/shell
    ===================================================================
    My code (if any) in this post is copyright 2004, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License


Relevant Pages

  • Re: Showing hidden files
    ... [This followup was posted to comp.unix.questions] ... > If I wanted to write a command sequence that lists only the hidden ...
    (comp.unix.questions)
  • Re: Showing hidden files
    ... KrisSeverance@Hotmail.com wrote in message ... > If I wanted to write a command sequence that lists only the hidden ... as that might choke the shell wildcard expander, ...
    (comp.unix.questions)
  • Re: Where did FreeBSD-SA-01:07 and 10 go?
    ... ok - it seems those advisories were not sent to the lists... ... I sent a message to Kris Kennaway... ...
    (FreeBSD-Security)
  • Re: IRS Summons: Time To Close Your Paypal and eBay Accounts
    ... Shop till you drop! ... Probably some other stuff around here...that should get itself listed on eBay. ... But no matter how much I scold and snarl, nothing ever lists itself. ... Kris ...
    (alt.marketing.online.ebay)
  • Re: Anyone use eBays email marketing?
    ... I see some of my customers do; unfortunately for them, ... Kris, how do you know if somebody did subscribe to that? ... I found that I get eBay generated lists from sellers that I have marked as ... and I can view the list of eBay IDs. ...
    (alt.marketing.online.ebay)