Gentoo Archives: gentoo-user

From: Florian Philipp <f.philipp@××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ext3 with errors
Date: Sun, 30 Sep 2007 16:53:46
Message-Id: 46FFD05D.1080100@addcom.de
In Reply to: Re: [gentoo-user] ext3 with errors by Etaoin Shrdlu
1 Etaoin Shrdlu schrieb:
2 > On Sunday 30 September 2007, Florian Philipp wrote:
3 >
4 >> Which shell do you use? Bash's default behavior (I don't know whether
5 >> you can change that) is that it doesn't expand * to all files and
6 >> directories but only the nonhidden.
7 >>
8 >> Just try the following:
9 >> ls -l --directory --all ~/*
10 >>
11 >> On my system it only shows my a long lost of all directories and files
12 >> without a dot at the beginning although, strictly speaking, the
13 >> command should show all files, even the hidden ones.
14 >
15 > No, it should not (assuming the syntax of your example), unless
16 > bash "dotglob" option is on. One thing are the options to ls, another is
17 > how the shell expands wildcard characters.
18 > In your example, the tilde is expanded to the user's home dir
19 > (eg, /home/user), the asterisk is expanded to all the file and directory
20 > names under /home/user not starting with ".", so what ls really sees is
21 >
22 > ls -l --directory --all /home/user/dir1 /home/user/dir2 /home/user/file1 /home/user/file2
23 > etc.
24 >
25 > Since you gave the "--directory" (aka "-d") option, and "*" expansion
26 > does not include names starting with ".", nothing else is printed.
27 > The "--all" option does not come into play at all here.
28 >
29 > A different story would be if you did not use the -d option; then names
30 > at first level starting with "." still would not have been shown
31 > (because "*" is expanded by the shell before ls sees the names), but
32 > directory contents would have been listed including names starting
33 > with ".", due to the --all option.
34 >
35
36 That's exactly what I wanted to explain to Dale ;)
37
38 Sorry if I puzzled you.
39 --
40 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] ext3 with errors Dale <dalek1967@×××××××××.net>