Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




They 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
        ;;




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: