Newbie ls question

Newbie ls question

Post by Paul Johns » Fri, 07 Aug 1998 04:00:00



I'm sure this has been asked a billion times, but I looked for a FAQ
and didn't find one, so here goes:

If I type 'ls p*'  and I have several files that begin with 'p' and
several directories that begin with 'p' it only lists the files.  But
if I type 'ls .p*' and I have several files that begin with '.p' and
several directories that begin with '.p' it will list the files AND
the contents of the directories.  Two questions:

1.  Why the different behavior?

2.  How do I get it to only show files.  I know that with ls I can
simply add the -d option, but what if I want to use 'cp .*p
<somewhere-else>' instead?  How do I get the shell to expand '.p*' to
filenames and not directories as it would with 'p*'?

Thanks,

Paul
--
--------
Paul Johnson
pauljo at netcom dot com

 
 
 

1. Ls newbie question

Just a short stupid question on ls output; could you please tell me what
the number after total on the first line of ls output refers to? Is it
about the number or size of files in the directory?
I look forward to hearing from you soon.
Thanks in advance.

2. Preferred email client

3. very newbie question (ls?)

4. Samba and filesize problem

5. Newbie Question (ftp ls)

6. SIGURG incorrectly delivered to process

7. /usr/bin/ls /usr/ucb/ls /usr/local/bin/ls

8. intranet

9. FTP keeps using /usr/bin/ls and not ~/ftp/bin/ls

10. newbie needs help with color in ls

11. unix ls or sort command newbie...

12. ls -a and ls *

13. ls color highlighting as in the ls command in the slackware distribution