DIR /S ... grand total?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
On my system drive, "z:\> dir /s /nj" reports

Code:
Total for:  Z:\*
20,973,404,937 bytes in 113,271 files and 54,697 dirs
54,697 DIRECTORIES!!!!!

I get this result with an external WC.EXE or my LC plugin.

Code:
z:\> global /h /i /q /n echo %_cwd | wc
  Lines   Words   Chars
  18519   24220 1684844

z:\> global /h /i /q /n echo %_cwd | lc
18519
I also get this result (which seems a bit more like it).

Code:
z:\> dir /s /nj | grep Total | wc
  Lines   Words   Chars
  18395   60830 2006508
It would seem that grand total for DIR /S is a little off.
 
#2
On 11/27/2011 7:30 PM, vefatica wrote:

> On my system drive, "z:\> dir /s /nj" reports
>
>
> Code:
> ---------
> Total for: Z:\*
> 20,973,404,937 bytes in 113,271 files and 54,697 dirs
> ---------
> 54,697 DIRECTORIES!!!!!
>
Try adding a /H to avoid having "." and ".." counted, that might get you
closed to reality.

--
Dave Warren, CEO
Hire A Hit Consulting Services
http://ca.linkedin.com/in/davejwarren
 
#4
On 11/28/2011 7:59 AM, vefatica wrote:

> ---Quote (Originally by thedave)---
> Try adding a /H to avoid having "." and ".." counted, that might get you
> closed to reality.
> ---End Quote---
> I thought TCC did not emulate the really dumb things that CMD does.
> I doubt anyone would ever want "." and ".." to be included in the count.
I can't even imagine the point of listing . and .. today at all in the
UI or anywhere else, although I'm sure that there are people that rely
on them.

(I'm not suggesting the underlying functionality disappear, there are
times where having a quick "here" or "up there" reference is useful,
just that they don't really add anything to directory listings)

--
Dave Warren, CEO
Hire A Hit Consulting Services
http://ca.linkedin.com/in/davejwarren