Hi,
I just noticed something weird on a fresh installation of Slackware -current. Let's say I'm looking for all files containing "TERM" in /etc. Here's what I would do:
Code:
# grep -l "TERM" /etc/* 2> /dev/null | sort
/etc/DIR_COLORS
/etc/csh.login
/etc/login.defs
/etc/lynx.cfg
/etc/profile
/etc/termcap
/etc/termcap-BSD
/etc/termcap-Linux
/etc/zprofile
Now I'm doing things differently:
Code:
# find /etc -type f -maxdepth 1 | xargs grep -l "TERM" | sort
/etc/DIR_COLORS
/etc/csh.login
/etc/login.defs
/etc/lynx.cfg
/etc/profile
/etc/termcap
/etc/termcap-BSD
/etc/termcap-Linux
How comes /etc/zprofile doesn't appear when I use the second method?
Let's try this with a different character string. First method:
Code:
# grep -l "PS1" /etc/* 2> /dev/null | sort
/etc/profile
/etc/zprofile
Second method:
Code:
# find /etc -type f -maxdepth 1 | xargs grep -l "PS1" | sort
/etc/profile
Same thing. I'm puzzled. Any idea what's going on here?