On Wed, Mar 21, 2001 at 07:10:03PM -0800, Alexander Poquet wrote:
ls -a | grep .c$
This is silly, of course, but if you want to be rigorous about it you
probably should do 'ls -a | grep \\.c$' because grep (unlike the shell)
uses proper regex syntax -- in which '.' is a special character
On Wed, Mar 21, 2001 at 07:10:03PM -0800, Alexander Poquet wrote:
...
Apropos, I have a question: frequently I am in a directory (such as /dev,
for example) which has more stuff in it than I can see in one screenful.
Normally I pipe it through less, but am bothered by the 'one file per
Try something like this:
/bin/ls --color -w $COLUMNS -F -C | less -r
or:
/bin/dir --color -w $COLUMNS -F | less -r
[EMAIL PROTECTED] (Alexander Poquet) writes:
Apropos, I have a question: frequently I am in a directory (such as /dev,
for example) which has more stuff in it than I can
Hello again tia,
Sorry if I sounded a little short-tempered in my last reply. It is a
little mind boggling. I did a touch .x.c and the following is the
result...
P3V4X:/usr/local/Temp/other# touch .x.c
P3V4X:/usr/local/Temp/other# ls *.c
one.c two.c
P3V4X:/usr/local/Temp/other# ls .*c
.c
On Wed, Mar 21, 2001 at 04:19:07AM -, 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,
On Wed, Mar 21, 2001 at 04:19:07AM -, 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?
Quite right ...
ls -a |
ls -a | grep .c$
This is silly, of course, but if you want to be rigorous about it you
probably should do 'ls -a | grep \\.c$' because grep (unlike the shell)
uses proper regex syntax -- in which '.' is a special character (match any
char). Thus 'ls -a | grep .c$ would list files such as
Hi John,
I think i know some of these
1) ls -a filecount wc -l filecount
2) find /your_dir -perm 0755 -print exec_count wc -l
exec_count (i think this'll work.. I didn't try it. man find
for more info)
3) ls *.tar.gz tar.gz_count wc -l
On Tue, Mar 20, 2001 at 03:21:22AM -0700, Jimmy Richards wrote:
Hi John,
I think i know some of these
1) ls -a filecount wc -l filecount
or ls -a | wc -l
2) find /your_dir -perm 0755 -print exec_count wc -l
exec_count (i think this'll work.. I didn't
Jimmy Richards [EMAIL PROTECTED] wrote:
4)ls *.c | sort
'ls' originally stood for List and Sort, as I remember - at any rate,
it already sorts. Its default output format isn't one on which 'sort'
would be particularly useful anyway.
--
Colin Watson
Hi Ethan,
Ahh-ha. Thank You for the info.
Jim Richards
On 20 Mar 2001 01:38:56 -0900, Ethan Benson wrote:
On Tue, Mar 20, 2001 at 03:21:22AM -0700, Jimmy Richards wrote:
Hi John,
I think i know some of these
1) ls -a filecount wc -l filecount
or
Hello Colin,
Ok, Thanks for the info. I think I have been piping stuff through
grep helping people on IRC so much lately I forgot that yeah, 'ls'
output is already sorted!
Jim Richards
On 20 Mar 2001 11:06:22 +, Colin Watson wrote:
Jimmy Richards [EMAIL PROTECTED]
To quote john smith [EMAIL PROTECTED],
# 1. How can I find out the total number of files (also hidden) in the
current
# directory?
#
# 2. How can I find out the total number of executable files (also
hidden) in
# the current directory?
#
# 3. how to find the total number of files of a given an
]
Sent: Tuesday, March 20, 2001 6:38 AM
To: john smith
Cc: debian-user@lists.debian.org
Subject: Re: quick howto-command questions?
To quote john smith [EMAIL PROTECTED],
# 1. How can I find out the total number of files (also hidden) in the
current
# directory?
#
# 2. How can I find
On Tue, Mar 20, 2001 at 09:12:41AM -, john smith wrote:
Hi,
Some quick questions;
1. How can I find out the total number of files (also hidden) in the current
directory?
ls -a | wc -l
2. How can I find out the total number of executable files (also hidden) in
the current
On Tue, Mar 20, 2001 at 09:12:41AM -, john smith wrote:
1. How can I find out the total number of files (also hidden)
in the current directory?
#!/path/to/perl
my $dir = shift || '.';
opendir DIR,$dir;
my @f = grep(
-f $_, # files only, no
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?
tia
_
Get your FREE
Hi Tia,
ls *.c .*c
That's it,
Jimmy Richards
On 21 Mar 2001 04:19:07 +, 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
Hello,
Well, I don't know what you're problem is. Just to make sure I was
doing this right just for you... I went into a directory that was
empty. I then did this
touch one.c two.c .c jim
This is the results.
P3V4X:/usr/local/Temp/other# ls *.c .*c
.c
19 matches
Mail list logo