Re: quick howto-command questions?

2001-03-22 Thread Jim Richardson
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

Re: quick howto-command questions?

2001-03-22 Thread Carel Fellinger
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

Re: quick howto-command questions?

2001-03-22 Thread W. Paul Mills
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

Re: quick howto-command questions?

2001-03-21 Thread Jimmy Richards
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

Re: quick howto-command questions?

2001-03-21 Thread will trillich
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,

Re: quick howto-command questions?

2001-03-21 Thread Bob Wilkinson
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 |

Re: quick howto-command questions?

2001-03-21 Thread Alexander Poquet
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

Re: quick howto-command questions?

2001-03-20 Thread Jimmy Richards
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

Re: quick howto-command questions?

2001-03-20 Thread Ethan Benson
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

Re: quick howto-command questions?

2001-03-20 Thread Colin Watson
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

Re: quick howto-command questions?

2001-03-20 Thread Jimmy Richards
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

Re: quick howto-command questions?

2001-03-20 Thread Jimmy Richards
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]

Re: quick howto-command questions?

2001-03-20 Thread David B . Harris
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

RE: quick howto-command questions?

2001-03-20 Thread Kuhar, Mike
] 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

Re: quick howto-command questions?

2001-03-20 Thread Bob Wilkinson
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

Re: quick howto-command questions?

2001-03-20 Thread will trillich
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

Re: quick howto-command questions?

2001-03-20 Thread john smith
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

Re: quick howto-command questions?

2001-03-20 Thread Jimmy Richards
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

Re: quick howto-command questions?

2001-03-20 Thread Jimmy Richards
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