I meet a strange phenomenom when using grep
on Solaris 10
:
I try to use grep
to find creat
related DTrace
probes. When in a folder (/data1/nan
), it works OK:
bash-3.2# pwd
/data1/nan
bash-3.2# dtrace -l | grep creat*
27 hotspot586 libjvm.so __1cHThreadsJcreate_vm6FpnOJavaVMInitArgs_pb_i_ vm-init-begin
28 hotspot586 libjvm.so __1cHThreadsJcreate_vm6FpnOJavaVMInitArgs_pb_i_ vm-init-end
574 fbt aggr aggr_ioc_create entry
575 fbt aggr aggr_ioc_create return
While in another folder(/data1/nan/DTraceToolkit-0.99/Proc/
), the grep
can't find anything:
bash-3.2# cd /data1/nan/DTraceToolkit-0.99/Proc/
bash-3.2# pwd
/data1/nan/DTraceToolkit-0.99/Proc
bash-3.2# dtrace -l | grep creat*
bash-3.2#
Could anyone give any clue about this issue, thanks very much in advance!
dtrace -l | grep creat*
can work on a folder while not in the other? I still can't figure out it. – Nan Xiao Jan 06 '15 at 03:36creat*
is expanded by the shell (globbing) into the names of files and folders starting withcreat
. Test it out withecho creat*
. – muru Jan 06 '15 at 03:38