×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hello,
On 4/19/2011 3:05 PM, fbocch2595@xxxxxxx wrote:
> ls -lR | wc -l
2067
This will give you more than just the number of files. It'll include
directories, plus it'll have extra lines for headings. (Which will add
to your count.)
I wouldn't use ls for this.
> find . -type f | wc -l
166
This will work better... but only includes "type f" (files). If that's
all you want, it's good.
> find -type f | wc -l
find: 001-3026 usage: find [-H | -L | -P] [-Xdx] [-f file] file ... [expression]
0
You've forgotten to specify the directory here. Syntax is:
find DIRECTORY -type f | wc -l
So this finds everything in the current directory (and it's subdirectories):
find . -type f | wc -l
And this finds everything in the /tmp directory (and it's subdirectories):
find /tmp -type f | wc -l
du -m
qsh: 001-0019 Error found searching for command du. No such path or directory.
There is no 'du' utility in QShell.
There's one in PASE, however... If you want to run the PASE one from
QShell, try:
/QOpenSys/usr/bin/du -m
(or add /QOpenSys/usr/bin to your PATH. Or use QP2TERM instead of
QShell where it'll be in the path by default.)
Personally, I wouldn't use the -m flag. This causes the outputs to be
in megabytes, which will result in all of your small files being
unmeasurable. I'd probably use 'du -k' (kilobytes). But, I guess it
all depends on what you're looking for.
As an Amazon Associate we earn from qualifying purchases.