DEV Community

abbazs
abbazs

Posted on

2

How to find the folder location of a command in linux?

To find all the folder locations where ls command is found:

type -a ls
Enter fullscreen mode Exit fullscreen mode

Returns

ls is aliased to `ls --color=auto'
ls is /usr/bin/ls
ls is /bin/ls
Enter fullscreen mode Exit fullscreen mode

Suppose there is a command by name ffbn and you want to know more about it:

type -a ffbn
Enter fullscreen mode Exit fullscreen mode

Returns

ffbn is aliased to `find_file_by_name'
Enter fullscreen mode Exit fullscreen mode
type -a find_file_by_name
Enter fullscreen mode Exit fullscreen mode

Returns

find_file_by_name is aliased to `find_file_by_name'
find_file_by_name is a function
find_file_by_name () 
{ 
    find . ! -readable -prune -o -type f -name "$1" -print
}
Enter fullscreen mode Exit fullscreen mode

Indeed type command is super useful to know about a command.
Documentation
Further help

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay