Re: quick howto-command questions?
On Wed, Mar 21, 2001 at 04:19:07AM -0000, john smith wrote:
> hi,
> Let's say I have 3 files namely; one.c, two.c and a hidden .c file (.hid.c).
> now I want to list them... the command
> ls -al *.c shows only the two files and it doesn't show the third one... any
> ideas?
the command shell (bash, tcsh ...) expands GLOBs such as
* or *.c or *this* to include anything in the directory
that does not start with DOT.
to get the 'hidden' dotfiles you gotta specify the leading dot
yourself, as in .??* or .bash* or .log* or .*rc ...
so, to see all *.c files that don't start with DOT:
ls *.c
echo *.c
to see all hidden .*.c files,
ls .*.c
echo .*.c
to seem them all-at-once,
ls *.c .*.c <- sorted lexically
echo *.c .*.c <- each glob expansion is sorted
--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
-- Isaac Asimov, 'The Genetic Code'
will@serensoft.com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
Reply to: