![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
recursive wc on a directory?
Hi all,
I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice? thanks in advance! |
|
|||
|
Quote:
Code:
wc -l `find /dir/name -type f` Note that those are backticks, and also be aware that if there are too many files you can exceed your shell's argument limitations. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Recursive FTP -- here at last. | Perderabo | Shell Programming and Scripting | 52 | 03-25-2009 12:15 PM |
| Recursive SFTP | MohanTJ | Security | 1 | 05-19-2008 01:17 AM |
| recursive rcp | Nicol | Shell Programming and Scripting | 6 | 11-06-2003 11:52 AM |
| Recursive directory listing without listing files | psingh | UNIX for Dummies Questions & Answers | 4 | 05-10-2002 11:52 AM |
| Recursive FTP | aslamg | UNIX for Dummies Questions & Answers | 1 | 03-08-2001 04:27 AM |