Directory Summary Command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Directory Summary Command
# 1  
Old 03-01-2005
Directory Summary Command

Is there a unix command to provides the number of files in a directory?
# 2  
Old 03-01-2005
ls | wc -l
# 3  
Old 03-01-2005
Quote:
Originally Posted by bhargav
ls | wc -l
the keyword was files.

find . ! -name . -prune -type f |wc -l
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to create a summary file of all files in a directory sorted in reverse alphabetical order.?

I have an interactive script which works terrific at processing a folder of unsorted files into new directories. I am wondering how I could modify my script so that( upon execution) it provides an additional labelled summary file on my desktop that lists all of the files in each directory that... (4 Replies)
Discussion started by: Braveheart
4 Replies

2. Shell Programming and Scripting

Subroutine or Function Summary

I have a fortran file with code declarations such as Subroutine str_tnum_tu & ( & s, dl, tu, pos & ) ! Class (*), Intent (InOut) :: tu(:) Character (Len=*), Intent (In) :: s, dl Character (Len=*), Intent (In), Optional :: pos ... or ... (11 Replies)
Discussion started by: kristinu
11 Replies

3. Shell Programming and Scripting

Change to directory and search some file in that directory in single command

I am trying to do the following task : export ENV=aaa export ENV_PATH=$(cd /apps | ls | grep $ENV) However, it's not working. What's the way to change to directory and search some file in that directory in single command Please help. (2 Replies)
Discussion started by: saurau
2 Replies

4. Shell Programming and Scripting

print summary of directory, and group all symbolic links

I am trying to get a summary of filetypes in a directory, but the total count of symbolic links is not working. I am stuck at the results of the file command. I have used the find command to confirm my expectations, but my bash function is not giving the results I want. Here is my function:... (2 Replies)
Discussion started by: AlphaLexman
2 Replies

5. Shell Programming and Scripting

Summary using awk

Displaying information using awk Hey guys, i am using awk to display my information in a certain order. Database : Persia:42:John France:50:Mabel Persia:50:Rach Germany:60:JohnMy expected output is : ... (25 Replies)
Discussion started by: gregarion
25 Replies

6. Shell Programming and Scripting

summary line help

$ cat file a:12:56:12 b:23:12:23 d:32:24:12 c:90:12:24 required output: a:12:56:12 b:23:12:23 d:32:24:12 c:90:12:24 t:157:104:71 t line is the total line, which will be the last line in the output. Please help. I tried this: (4 Replies)
Discussion started by: uwork72
4 Replies

7. HP-UX

How to summary one command's cpu usage?

I want to record one application's(like oracle etc...) CPU usage summary. I can filter by "ps". But how to sum? Thanks (1 Reply)
Discussion started by: jiarong.lu
1 Replies
Login or Register to Ask a Question