Tiny Core Linux
dCore Import Debian Packages to Mountable SCE extensions => dCore X86 => Topic started by: nitram on June 02, 2016, 04:41:55 AM
-
tc@box:~$ which grep
/bin/grep
tc@box:~$ sudo find / -name "grep"
/bin/grep
/bb/grep
/tmp/tcloop/xorg-intel/bin/grep
Clarification for wiki. Based on above my system uses faster grep? Does /bin/grep standard in all xorg-* extensions? Xvesa does not include grep. So only those running Xvesa or non-graphic would benefit from the extra GNU grep install for speed?
-
Hi nitram
Actually, that does not tell you which grep is really being used since /bin/grep could be an executable or a link to an
executable. To find out, run:
ls -l /bin/grep
-
Thanks Rich.
Actually it is a link to xorg-intel's /bin/grep, so looks like the faster grep is being used?
tc@box:~$ ls -l /bin/grep
lrwxrwxrwx 1 root root 31 Jun 2 14:26 /bin/grep -> /tmp/tcloop/xorg-intel/bin/grep
Does /bin always take precedence over /bb ?
-
Hi nitram
Does /bin always take precedence over /bb ?
Precedence is determined by the $PATH variable.
-
Thanks again. For those learning like me, /etc/profile provides system wide profile and path info:
# /etc/profile: system-wide .profile file for the Bourne shells
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/bb"
Not sure where /$HOME/.local/bin fits into this, will figure out with a bit of experimentation.
To wrap up, Jason or any dCore users know if GNU grep is automatically installed with all xorg-* SCEs?
If not, will just provide brief explanation in the wiki, thanks.
-
Hi nitram
Not sure where /$HOME/.local/bin fits into this, will figure out with a bit of experimentation.
The $HOME variable expands to a path to the home directory of the current user. The default user is tc , so it expands to:
tc@box:~$ echo $HOME
/home/tc
tc@box:~$If you created a user nitram and logged in as nitram, it would look like this:
nitram@box:~$ echo $HOME
/home/nitram
nitram@box:~$/$HOME/.local/bin shows up at the beginning of $PATH :
tc@box:~$ echo $PATH
/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mnt/sda3/tce/ondemand
tc@box:~$/$HOME/.local/bin is a good place for scripts and executables that should be unique to a particular user.
-
As for if the grep package from Debian/Ubuntu is installed as a part of any SCE, then that is the grep that is used and that helps sce-import performance tremendously. Below is my $PATH on my dCore-trusty:
/home/jason/Applications/.bin:/usr/bin:/home/jason/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/bb:/etc/sysconfig/tcedir/ondemand
Notice how /bb is near the last on the list, busybox apps are only used when their full versions are not installed.
-
Hi Jason W
Your path $PATH has /usr/bin listed twice.
-
Thanks. That must be due to an application tacking that on to the beginning of PATH, as with the /home/jason/Applications, as neither of those is at the beginning of PATH in either ~/.profile or /etc/profile. If I remember enlightenment takes the directory used by "--prefix=" when compiling and adds it to the beginning of the PATH.
-
Thanks all, will just add detailed notes to wiki so users can check for themselves which grep they're using.
-
dCore's grep wiki was updated to best of my abilities. Simple case study at the bottom, quite a difference, /bb/grep vs GNU Grep. Thanks again for all the help. Due to re-organizing the link may be moved later, but it's here now in case it helps someone else. Got me curious, will need to check my TC6 install later: http://wiki.tinycorelinux.net/dcore:handling_extensions?&#notice_about_grep.