4 ms·
> Like "ls" sometimes actually being aliased to a bash script, or maybe BSD having one implementation and Ubuntu another It is true that BSD and linux sometime
by TheDong 6y ago
> Like "ls" sometimes actually being aliased to a bash script, or maybe BSD having one implementation and Ubuntu another
It is true that BSD and linux sometimes have different implementations of posix commands.
The vast majority of linux distros are using the same gnu coreutils though. There are alternate implementations (like busybox, among others), but they're not often used in desktop distros.
I'm curious if you have any example of a linux distro that does treat ls so weirdly; that uses anything other gnu coreutils or busybox for it.
- Arnavion 6y agoThey probably didn't mean replace wholesale, but that `ls` in a shell is a wrapper around the underlying coreutils `ls` with some extra flags by default. Eg: $ (. /etc/os-release; echo "$NAME:$VERSION_ID") openSUSE Tumbleweed:20210121 $ command -v ls alias ls='_ls' $ grep -A6 -B1 '_ls ()' /etc/profile.d/ls.bash bash|dash|ash) _ls () { local IFS=' ' command ls $LS_OPTIONS ${1+"$@"} } alias ls=_ls ;;