DIR command combo that hangs with high CPU %

Sep 7, 2011
14
0
I have a command I try to use on occasion when I want to search for text globally on disk (usually from the C:\ directory):

ffind/s/v/t"amazing" *.*|list/s

(replace 'amazing' with the text to search for)

TCC never completes this command (I've let it run for days on end) and task manager shows TCC with high (30-100%) CPU utilization. If I do the same command without the list/s at the end it completes within a short time. In that case however, if the text is found in binary files I often get a lot of beeps from embedded bell characters being 'displayed'. Also, sometimes there is so much text produced it overflows the scrollback buffer and I am unable to see all matches. Thus the list/s to capture it into a scrollable screen.

I know there are other ways of accomplishing what I want, but it would be nice if this command combination worked as expected.

TCC 12.10.58 x64 Windows 7 [Version 6.1.7601]
TCC Build 58 Windows 7 Build 7601 Service Pack 1
Windows 7 Home Premium x64 Athlon II x2 8Gb RAM
(Although I've had the same results on all versions TCC (9.x-12.x) and all versions of Windows 7 I've tried, and IIRC Windows XP had this problem too)
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,493
91
Albuquerque, NM
prospero.unm.edu
That command works fine here, grovelling through 74 gigs in under three minutes. (Window XP, 32-bit.)

Do you have an alias for LIST? What's in your TCSTART file?
 
Sep 7, 2011
14
0
That command works fine here, grovelling through 74 gigs in under three minutes. (Window XP, 32-bit.)

Do you have an alias for LIST? What's in your TCSTART file?

No alias for list.

TCSTART contains:
prompt $t $+$P$g
shralias
alias /r "%@Path[%comspec]aliases"

Perhaps something in TCMD.INI? I've attached a copy...
 

Attachments

  • TCMD.INI
    2.9 KB · Views: 91
May 20, 2008
3,515
4
Elkridge, MD, USA
The first command in TCSTART ought to be something like this:

if %_pipe EQ 1 quit

because a piped-to session already inherits the whole environment (variables including PROMPT and PATH, functions, aliases, etc.), so most of that work is superfluous. Regardless, it is still short enough (though requiring at least one disk access) that it could not account for all of the processor time it accumulates.

I'd suggest you try the in-process pipe "|!" - it puts the result of the command on the left into a temporary file, which is then used as the input of the command on the right.
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
I have a command I try to use on occasion when I want to search for text globally on disk (usually from the C:\ directory):

ffind/s/v/t"amazing" *.*|list/s

(replace 'amazing' with the text to search for)

TCC never completes this command (I've let it run for days on end) and task manager shows TCC with high (30-100%) CPU utilization.

Not reproducible here (it searches my D: drive with 447Gb in files in about 4 minutes).

Try it with the /NJ switch as well -- you might have a circular junction / symlink. (If you're running Windows 7 and doing this on your C: drive, you definitely have circular junctions, because that's how Windows 7 is configured by default!)
 
Sep 7, 2011
14
0
Not reproducible here (it searches my D: drive with 447Gb in files in about 4 minutes).

Try it with the /NJ switch as well -- you might have a circular junction / symlink. (If you're running Windows 7 and doing this on your C: drive, you definitely have circular junctions, because that's how Windows 7 is configured by default!)

Sorry for the delay in responding. Been distracted with other things.

Thanks for all of the suggestions, but none of them have resolved the problem: /NJ, |!, redirect to a file, pipe to MORE, all hang. Past experience tells me Murphy is behind it... I seem to have all kinds of strange problems no one else encounters, with all kinds of tools. I guess I should just feel special and move on...
 
Sep 7, 2011
14
0
Just off the top of my head - would a disk check and maybe a defrag help matters here?
Defrag regularly, haven't done a chkdsk lately but I have had this problem consistently for a long time and have tried it on other Win7 machines, seeing the same problem.

Might be an interaction with some of my other software... I guess I could spin up a clean Win7 VM and try it there... But I have another grep tool I can use, so the time consumed on this issue is crossing the "worth it" threshold.
 
Similar threads
Thread starter Title Forum Replies Date
Jesse Heines How to? How to display picture creation date with dir command Support 6
A TCMD - Dir Command puts out blank lines? Support 16
S Problems with dir command in the debugger Support 5
P WAD TC 15.0.1.58 x64 crasches with a simple dir command Support 18
old coot TC DIR command has trouble on my SSD Support 2
M WAD An oddity with the "Dir" command... Support 2
R TC 13 / TCDIALOG for 'dir' / show command Support 2
E TCC dir /s command not showing all folders Support 6
BobK The "JUNCTION" confusion with DIR at a command line Support 9
G file not detected by "DIR" command? Support 4
E Fixed Bug with DIR /Z displaying descriptions Support 8
J Paths shown in DIR /B Support 2
K Fixed Prompt display will be shifted after use dir to display a filename with Chinese. (v25.00.28 x64) Support 18
vefatica WAD DIR.BTM? Support 11
DrusTheAxe DIR reports meaningless SYMLINK information Support 14
C show file description? with dir? Support 8
vefatica DIR /F and streams? Support 7
rps Multi-column DIR /v not displaying all files. Support 5
R How to? Dir specific file search patterns with spaces in the pathnames? Support 6
rps Dir /Nfv -> Alt-F2 Support 2
rps @FILESIZE[....,a] allocated size not matching Dir results Support 8
M TCC incorrect dir output since Windows 1803 Support 6
x13 Problem listing repository files using DIR http(s)://... Support 8
cxxl dir /s works in mysterious ways :( Support 4
vefatica Help nit (FFIND and DIR with /S) Support 0
N Fixed Strange dir behavior Support 6
JohnQSmith Weird DIR output (missing lines) Support 1
C 7zip with date range .vs. filelist created with dir and daterange Support 0
D Towards shared (dir-)history lists Support 3
vefatica WAD DIR /HL still gets names wrong Support 16
vefatica DIR /S /HL? Support 4
H Fixed DIR /G returns wrong sizes Support 2
nickles WAD dir.htm Support 2
vefatica DO dir in /s /a:+d /d"g:\" * ( ... ) Support 26
vefatica DIR \\.\...? Support 4
M Fixed DIR /S /B1 ignores "/S" Support 5
C tcmd.ini not loading from program dir? Support 5
D Fixed Dir /Nm:n has changed Support 1
rps How to? dir /s unexpected results Support 10
vefatica Update to current install dir? Support 8
cgunhouse Problem with "dir /=" Support 4
T dir /h error in empty directory Support 22
CWBillow dir /4 strange Support 2
samintz WAD DIR /B1 and /X Support 2
nickles dir behaves inconsistently Support 5
vefatica DIR, streams, and wildcards? Support 1
vefatica DIR /: /u ... streams not counted? Support 7
vefatica Documentation DIR /B /S /: Support 2
samintz How to? DIR listing for exact match Support 1
dcantor WAD dir "ftp:// ..." fails in TCC 15 Support 7

Similar threads