How do i find all the places a command is used on redhat?



  • A command may be aliased, scripted or a binary.

    Where is ls defined in PATH, function or alias? Here it's just the PATH

    $ type -a ls
    ls is /bin/ls
    

    Let's define an alias.

    $ alias ls='ls -ltr'
    

    Check with the type command again. Now it's an alias and in the PATH. The alias is referenced first.

    $ type -a ls
    ls is aliased to `ls -ltr'
    ls is /bin/ls
    

Log in to reply
 

© Lightnetics 2024